JS: iterating over result of getElementsByClassName using Array.forEach

No. As specified in DOM4, it’s an HTMLCollection (in modern browsers, at least. Older browsers returned a NodeList). In all modern browsers (pretty much anything other IE <= 8), you can call Array’s forEach method, passing it the list of elements (be it HTMLCollection or NodeList) as the this value: If you’re in the happy position of being able to use ES6 (i.e. you can safely … Read more