I\'m running this snippet the console. In IE it produces the output just as expected. Running the same in Cr and FF for reference confirms the congruence of behavior.
<
Little late, but it might be useful if someone has the same problem and doesn't want/can't replace all forEach methods with [].forEach.call(elements, fn(el))
. Here is polyfill that works for ie11
if (! Object.getOwnPropertyDescriptor(NodeList.prototype, 'forEach')) {
Object.defineProperty(NodeList.prototype, 'forEach', Object.getOwnPropertyDescriptor(Array.prototype, 'forEach'));
}