How to detect ECMAscript version?

后端 未结 3 1075
感情败类
感情败类 2021-02-19 01:35

I want to see what ECMAscript version I\'m using in my browser(e.g,chrome 59) ,because there is some difference between ECMAscript3 and ECMAscript5 when dealing with something R

3条回答
  •  -上瘾入骨i
    2021-02-19 02:40

    I don't think that's possible because browsers normally don't implement all features of an ECMAScript version at once. That's why we have libraries like Modernizr and websites like Can I use ... to find out what features can be used.

    You could still build a little test that determines how RegEx in the user's browser version behaves.

提交回复
热议问题