re: How do I use .forEach on DOM Elements? VIEW POST

FULL DISCUSSION
 

I've always used [].forEach.call(nodeList, n => n.something), however be careful if in that loop you are removing or adding nodes. Found that out the hard way.

code of conduct - report abuse