0

Possible Duplicate:
To tell Javascript version of your browser

With JavaScript is it possible to detect the current version of JavaScript supported in the browser?

I'm looking for something similar to navigator.userAgent but for the JavaScript version.

EDIT: I'm not asking that to perform feature detection. I'm digging more into JavaScript, and use my browsers' javascript consoles. I would like to know for each of my browsers if they support ECMAScript Edition 5 for instance.

Community
  • 1
  • 1
Florent2
  • 3,463
  • 3
  • 28
  • 38

2 Answers2

2

You can try something like this:

<script language="Javascript">var jsversion = 1.0;</script>
<script language="Javascript1.1"> jsversion = 1.1;</script>
<script language="Javascript1.2"> jsversion = 1.2;</script>
<script type=text/javascript>
    console.log("Your javascript version is " + jsversion );
</script>

Almost the same as Neal linked to...

Community
  • 1
  • 1
jerone
  • 16,206
  • 4
  • 39
  • 57
1

There aren't reliable ways to do it

Riccardo Galli
  • 12,419
  • 6
  • 64
  • 62