devxlogo

Determining the Version of JavaScript Running

Determining the Version of JavaScript Running

Question:
How can I tell which version of JavaScript I am running? I have written JavaScript that runs under Netscape 3 and all the more recent browsers.

Answer:
In the case of Netscape Navigator, which version of JavaScript you’re running depends on the browser you’re using. In Internet Explorer, the version of JScript (Microsoft’s JavaScript clone) is harder to pin down. This is because the JScript scripting engine is not part of the browser executable and is actually implemented in a separate component. This means that it’s possible to have a different, newer, scripting engine installed than the one that originally shipped with your Internet Explorer browser. Given these possibilities your best bet is to test for the browser make and version and then hope for the best.

devx-admin

Share the Post: