var href = 'blabla',
arrayA = ev.srcElement.getElementsByTagName('a') || [];
arrayA.push(href)
//выкидывает
TypeError: undefined is not a function
// проверяю в консоли
arrayA
[]
typeof arrayA
"object"
arrayA.push('dddd')
TypeError: undefined is not a function
arrayA = []
[]
typeof arrayA
"object"
arrayA.push('dddd')
1