Object doesn’t support property or method ‘forEach’

To make NodeList.forEach() method work on internet explorer, you will have to add the following polyfill in your application.

(function () {
    if ( typeof NodeList.prototype.forEach === "function" ) return false;
    NodeList.prototype.forEach = Array.prototype.forEach;

If this polyfill helped in your work, let us how it helped you by your comments !

You may also like...