How to Check Version of JavaScript

JavaScript has evolved massively as a programing language in recent times, especially in the last 5 years. The development team are always introducing new utilities to make coding with JavaScript cleaner and more intuitive. As a result, it is important to know which version of JavaScript you are running so you can make a decision about whether to upgrade it or not.

 

In this tutorial, we will look at ways to check what version of JavaScript your browser is using.

 

Check Version JavaScript your Browser is Running

We can check the JavaScript version your browser is by adding the following code into the head section of an HTML page.

 

<script type="text/javascript">
   var version = 1.0;
</script>

<script language="Javascript1.1"> version = 1.1; </script>
<script language="Javascript1.2"> version = 1.2; </script>
<script language="Javascript1.3"> version = 1.3; </script>
<script language="Javascript1.4"> version = 1.4; </script>
<script language="Javascript1.5"> version = 1.5; </script>
<script language="Javascript1.6"> version = 1.6; </script>
<script language="Javascript1.7"> version = 1.7; </script>
<script language="Javascript1.8"> version = 1.8; </script>
<script language="Javascript1.9"> version = 1.9; </script>

<script type="text/javascript">
 alert(version);
</script>
1.7

 

If you are using Google Chrome or another Chromium-based browser you can type the following command into your URL bar.

 

chrome://version/
Brave	1.8.90 Chromium: 81.0.4044.129 (Official Build) (64-bit)
Revision	3d71af9f5704a40b85806f4d08925db24605ba25-refs/branch-heads/4044@{#979}
OS	macOS Version 10.14.6 (Build 18G95)
JavaScript	V8 8.1.307.31
Flash	(Disabled)
User Agent	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36

 

Conclusion

You now know what version of JavaScript you have running. If it is years out of date you should probably update your browser.

browser