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.
Advertisement
Answer
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.