The forEach() method executes a provided function once for each array element.... .prototype.add = function(array) { array.forEach(function(entry) { this...
Plus this to use with html elements: NodeList.prototype.forEach = HTMLCollection.prototype.forEach = Array.prototype.forEach; Voila! share|improve this ans...