Why doesn't indexOf work on an array IE8?

后端 未结 7 803
耶瑟儿~
耶瑟儿~ 2020-11-22 04:15

The below function works fine on Opera, Firefox and Chrome. However, in IE8 it fails on the if ( allowed.indexOf(ext[1]) == -1) part.

Does anyone know w

7条回答
  •  后悔当初
    2020-11-22 05:12

    For a really thorough explanation and workaround, not only for indexOf but other array functions missing in IE check out the StackOverflow question Fixing JavaScript Array functions in Internet Explorer (indexOf, forEach, etc.)

提交回复
热议问题