0

Is there a way to detect which version of javascript this engine has? on console and browsers

for example i want to know conformance of

/usr/bin/js
/usr/bin/node
/usr/bin/ringo
/usr/bin/rhino
/usr/bin/seed
/usr/bin/gjs 
and browsers i currently using, etc 

are they Javascript 1.8.5 compatible or not, or which version of javascript they had

2 Answers 2

1

Check the following similar scenario.Hope this helps

jQuery version compatibility detection

Thanks AB

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

1 Comment

That answer is for jQuery, not javascript. The linked answer uses the jQuery version property (intuitively called "jquery"), there is no equivalent in javascript.
1

Try the following script to know the Javascript version

<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>

Check this jsFiddle http://jsfiddle.net/Ac6CT/

Thanks

AB

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.