JavaScript: Object doesn't support property or method 'forEach' on Internet Explorer

From The Travis van der Font Wiki
Jump to: navigation, search

Internet Explorer is garbage and doesn't support native forEach.

Solution

Use jQuery's each function.

args.forEach(function (item)
{
    // ...
});


becomes:

$.each(args, function (index, item)
{
    // ...
});