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

FULL DISCUSSION
 

Why don't you just implement it by yourself?🤔 Something like this:

NodeList.prototype.foreach = function(cb, thisArg) {
   for(element of this)
     cb.call(thisArg, element);
}
code of conduct - report abuse