Он возвращает список, подобный массиву.
Вы делаете этот массив как пример
var el = getElementsByClassName("elem"); el = Array.prototype.slice.call(el); //this line el[0].appendChild(otherElem);