How do I know which version of Javascript I'm using?

I am just reading this Javascript 1.2 documentation, but I wonder what version of Javascript is used in the most popular browsers.

http://www.tutorialspoint.com/javascript/javascript_nested_functions.htm

+73
javascript
Nov 24 '10 at 21:08
source share
6 answers

Wikipedia (or rather the Wikipedia community) contains a pretty good updated list here .

  • Most browsers are at 1.5 (although they have features of later versions)
  • Mozilla is advancing with every release point (they support the standard, so no wonder)
  • Firefox 4 is on JavaScript 1.8.5
  • Another big out-of-band way is IE9 - it implements ECMAScript 5, but does not implement all the JavaScript 1.8.5 features (not sure if they call this version of JScript, the code name of the Chakra engine, for now).
+33
Nov 24 '10 at 21:12
source share

Click this link to find out which version your BROWSER is using: http://jsfiddle.net/Ac6CT/

You should be able to filter using script tags for each version of JS.

<script type="text/javascript"> var jsver = 1.0; </script> <script language="Javascript1.1"> jsver = 1.1; </script> <script language="Javascript1.2"> jsver = 1.2; </script> <script language="Javascript1.3"> jsver = 1.3; </script> <script language="Javascript1.4"> jsver = 1.4; </script> <script language="Javascript1.5"> jsver = 1.5; </script> <script language="Javascript1.6"> jsver = 1.6; </script> <script language="Javascript1.7"> jsver = 1.7; </script> <script language="Javascript1.8"> jsver = 1.8; </script> <script language="Javascript1.9"> jsver = 1.9; </script> <script type="text/javascript"> alert(jsver); </script> 

My Chrome 1.7 reports

Blissfully stolen from: http://javascript.about.com/library/bljver.htm

+61
Nov 24 '10 at 21:14
source share

In Chrome, you can easily find not only the JS version, but also the flash version. All you need to do is type chrome://version/ on the command line and you will get something like this:

enter image description here

+10
Jul 25. '14 at 23:16
source share

All modern browsers use at least version 1.5 :
http://en.wikipedia.org/wiki/ECMAScript#Dialect

As for your tutorial site, the information seems to be extremely outdated . I ask you to go to the MDC and read their Guide:
https://developer.mozilla.org/en/JavaScript/Guide

You can still keep track of features that require version 1.6 or higher, as this can cause Internet Explorer problems.

+2
Nov 24 '10 at 21:11
source share

Instead of finding which version you are using, you can rephrase your question to "which version of the ECMA script does my browser have a JavaScript / JSscript engine".

For IE:

 alert(@_jscript_version); //IE 

Check out Squeegy's answer for non-IE versions :)

+2
Nov 24 '10 at 21:16
source share

JavaScript 1.2 was introduced with Netscape Navigator 4 in 1997. This version number only ever mattered to Netscape browsers. For example, the Microsoft implementation (as used by Internet Explorer) is called JScript and has its own version numbering, which is not related to Netscape numbering.

+1
Nov 24 '10 at 21:14
source share



All Articles