4 ms·
Just a nitpick, but querySelectorAll returns a NodeList. This can bite at times, for example IE supports Array.forEach, but not NodeList.forEach
by t_tsonev 6y ago
Just a nitpick, but querySelectorAll returns a NodeList.
This can bite at times, for example IE supports Array.forEach, but not NodeList.forEach
- dceddia 6y agoYeah this gets me every time. You can .forEach a NodeList, but can't .map. I usually end up wrapping it in an array and calling map on it like [...theNodeList].map(...)