You don't need to call the slice method:
Array.prototype.forEach.call(document.querySelectorAll('thing'), function (elem) { value = somevalue; });
Re:Why It's Time to Sunset jQuery
by TazeTSchnitzel on Sunday April 14, 2013 @05:32PM
(#5548417)
And I could use underscore, a much more general-purpose library than jQuery to help me here, only 4kb. So:
_.each(document.querySelectorAll('thing'), function (elem) { value = somevalue; });
(But then I might as well just use jQuery, I guess)
Except this doesn't work, because that's not a real array, it's a stupid NodeList. :(
So you'd have to do:
ugh.