2 ms·
Probably meant to be [].slice.call(document.querySelectorAll('.foo')).forEach(... It "casts" the NodeList which is "Array-like" to a proper Array, which h
by egeozcan 11y ago
Probably meant to be
[].slice.call(document.querySelectorAll('.foo')).forEach(...
It "casts" the NodeList which is "Array-like" to a proper Array, which has forEach, map and other useful methods in its prototype.