Re:Bling – the $ of jQuery without the jQuery
by renekooi on Monday June 15, 2015 @05:43AM
(#9718369)
querySelectorAll returns a NodeList instead of a real array, so you can't call things like `.forEach` on the result. `[].slice.call(x)` turns x into an array, so that becomes
Because a lot of array methods are "generic", i.e. operate on array-like objects instead of just arrays, that can be "compacted" to
but neither are very nice.
[ Parent
| on HN ]
There are no comments on this comment yet.