IE/JS: reduce on an object

前端 未结 2 1366
小鲜肉
小鲜肉 2021-01-12 06:57

my javascript Application works on firefox and chrome very well. But it seams to be broken on Internet Explorer (IE 8).

I did not get an error Message on the console

相关标签:
2条回答
  • 2021-01-12 07:19

    Reduce is not supported until IE 9 : https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/reduce#Browser_compatibility

    That link does have a workaround bit of code for browsers that don't support reduce.

    0 讨论(0)
  • 2021-01-12 07:20

    You can also find other ES5 JavaScript array functions polyfills here:

    http://tech.pro/tutorial/1834/working-with-es5-javascript-array-functions-in-modern-and-legacy-browsers#indexof

    0 讨论(0)
提交回复
热议问题