JavaScript versions – a historical note

JavaScript FAQ | Basic Syntax & General Questions  

Question: What JavaScript versions are there?

Answer: JavaScript is one of the youngest programming languages. It was first implemented by Netscape Communications in 1995. The first browser to support JavaScript was Netscape Navigator 2.0 beta version. By 1999 the two major browsers, Netscape Navigator and Microsoft Internet Explorer, supported the following client-side versions of JavaScript:

Browser Year JavaScript Version
Netscape Navigator 2.0 1995 JavaScript 1.0
Microsoft Internet Explorer 3.0 1996 JavaScript 1.0 (JScript 1.0)
Netscape Navigator 3.0 1996 JavaScript 1.1
Netscape Navigator 4.0 1997 JavaScript 1.2
Microsoft Internet Explorer 4.0 1997 JavaScript 1.2 (JScript 3.0)
Netscape Navigator 4.5 1998 JavaScript 1.3
Microsoft Internet Explorer 5.0 1999 JavaScript 1.3 (JScript 5.0)

Netscape and Microsoft implementations of JavaScript were quite different, even for the same JavaScript version number. For example, JavaScript 1.0 in Internet Explorer 3 differed from JavaScript 1.0 in Netscape Navigator 2; similarly, JavaScript 1.2 in Internet Explorer 4 was not the same as JavaScript 1.2 in Netscape Navigator 4. In addition to these JavaScript versions, quite a few companies have also created their own JavaScript implementations.

Fortunately, by the late 1990s, the core JavaScripit language has been standardized (under the name ECMAScript). The new reality is that a web developer should no longer care about the JavaScript version number per se – rather, robust portable scripts must rely on the JavaScript ECMA 262 Standard, detect the features they need, and degrade gracefully if any features are not available.

What does that mean for cross-platform coding? Essentially, you have to use either of the following techniques:

Be sure to test your scripts on all target platforms.

Copyright © 1999-2011, JavaScripter.net.