Which Javascript version(s) does IE8 supports?

前端 未结 4 588
天命终不由人
天命终不由人 2021-01-31 15:09

According to Wikipedia, IE8 only supports Javascript 1.5. So they are saying IE8 completely ignores Javascript versions 1.6, 1.7, 1.8 and 1.9.

Should I trust? Is it true

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-31 15:46

    Yes, that is true (at least as far as which language features are supported). You can easily check this using some Javascript 1.6 code:

    alert([1,2,3].indexOf(2));
    

    IE 8 throws an error.

    Note that IE 8 might support some of the features added in later versions of Javascript. IE contains a lot of stuff outside the standards, so it's likely that some of it happens to be the same as the later additions.

提交回复
热议问题