i'm using forEach which of course IE doesn't like. I have added the polyfill which is provided from Mozilla, however this only gets binded to the Array prototype.
So IE is still complaining as Object type doesn't suuport forEach
SCRIPT438: Object doesn't support property or method 'forEach'
Should I not be using forEach on an Object
? Which works fine on all other browsers!
An example of how i'm using forEach
:
var elements = {
'test1': 'hello',
'test2': 'world'
};
elements.forEach(function(element, i) {
console.log(element);
}