0

Is it possible to detect which javascript version the browser currently is using.

I want to know if it is Ecmascript 4/5/6

Is it possible by using the console??

3
  • Also, take a look at Detecting version of JavaScript within browser Commented Jan 23, 2013 at 13:39
  • 2
    Test for features, not versions. Commented Jan 23, 2013 at 13:41
  • sorry for the late reply i wanted to know if it is possible using console i know the earlier SCRIPT LANGUAGE="JavaScript1.1" just wanted to know if there is any other way by which the browser shows that it support ES6 Is there any browser inbuilt function??maybe specific for firefox me not asking for all browser Commented Jan 23, 2013 at 16:21

1 Answer 1

1

You can use the language attribute to detect the version of JavaScript.

<SCRIPT LANGUAGE="JavaScript1.1">
// do something on with browsers that use Javascript 1.1
</SCRIPT>

However for detecting what functions are available you are better to detect the individual features available, as browser don't always implement everything in the ECMAScript version.

Modenizer is a well used library for doing this.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.