form.elements, document.getElementsByTagName, document.getElementsByClassName and document.querySelectorAll return a node list.
A node list is essentially an object that doesn't have any methods like an array.
If you wish to use the node list as an array you can use Array.from(NodeList) or the oldschool way of Array.prototype.slice.call(NodeList)
// es6
const thingsNodeList = document.querySelectorAll('.thing')
const thingsArray = Array.from(thingsNodeList)
thingsArray.forEach(thing => console.log(thing.innerHTML))
// es5
var oldThingsNodeList = document.getElementsByClassName('thing')
var oldThingsArray = Array.prototype.slice.call(oldThingsNodeList)
thingsArray.forEach(function(thing){
console.log(thing.innerHTML)
})
one
two
three
four