document.querySelectorAll(selector).forEach(function (elem) { value = somevalue; });
Except this doesn't work, because that's not a real array, it's a stupid NodeList. :(
So you'd have to do:
Array.prototype.slice.call(document.querySelectorAll('thing'), 0).forEach(function (elem) { value = somevalue; });
Array.prototype.forEach.call(document.querySelectorAll('thing'), function (elem) { value = somevalue; });
_.each(document.querySelectorAll('thing'), function (elem) { value = somevalue; });
Except this doesn't work, because that's not a real array, it's a stupid NodeList. :(
So you'd have to do:
ugh.