I would like to...
Another approach could be to use a selector:
var arr = document.querySelectorAll('.exampleClass'); for (var i=0;i
Although it's not compatible with older browsers, it can do the trick as well if the webcontent is for modern browsers.