Code not running in IE 11, works fine in Chrome

前端 未结 8 1213
春和景丽
春和景丽 2020-12-04 17:16

The following code can be run without a problem in Chrome, but throws the following error in Internet Explorer 11.

Object doesn\'t support property or

8条回答
  •  一生所求
    2020-12-04 17:55

    As others have said startsWith and endsWith are part of ES6 and not available in IE11. Our company always uses lodash library as a polyfill solution for IE11. https://lodash.com/docs/4.17.4

    _.startsWith([string=''], [target], [position=0])
    

提交回复
热议问题