Detect version of JavaScript


How can I detect what version of JavaScript the browser supports (if any)? I want to check for ECMAScript 3 versus ECMAScript 5 versus ECMAScript 6.

Note: I want to avoid the deprecated language tag.


I suppose it depends on what you want to do with the information, but many people prefer to do feature detection, instead of figuring out what browser someone is using or what version of JS.

Check out Modernizr, which is a great library that does feature detection for you.

Answered By – Matt

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published