Our volunteers haven't translated this article into Română yet. Join us and help get the job done!
The following is a changelog for JavaScript from Netscape Navigator 3.0 to 4.0. The old Netscape documentation can be found on archive.org. Netscape Navigator 4.0 was released on June 11, 1997. Netscape Navigator 4.0 was the third major version of the browser with JavaScript support.
JavaScript versions
Netscape Navigator 4.0 executes JavaScript language versions up to 1.2. Note that Netscape Navigator 3.0 and earlier ignored scripts with the language attribute set to "JavaScript1.2" and higher.
<SCRIPT LANGUAGE="JavaScript1.1"> <!-- JavaScript for Navigator 3.0. --> <SCRIPT LANGUAGE="JavaScript1.2"> <!-- JavaScript for Navigator 4.0. -->
New features in JavaScript 1.2
New objects
- You can create objects using literal notation (inspired by dictionary literal syntax from Python 1.x).
- Arrays can now be created using literal notation (inspired by list literal syntax from Python 1.x).
- arguments
New properties
New methods
Array.prototype.concat()
Array.prototype.slice()
String.prototype.charCodeAt()
String.prototype.concat()
String.fromCharCode()
String.prototype.match()
String.prototype.replace()
String.prototype.search()
String.prototype.slice()
String.prototype.substr()
New operators
delete
- Equality operators (
==
and!=
)
New statements
- Labeled statements
switch
do...while
import
export
Other new features
Changed functionality in JavaScript 1.2
- You can now nest functions within functions.
- Number now converts a specified object to a number.
- Number now produces
NaN
rather than an error ifx
is a string that does not contain a well-formed numeric literal. - String now converts a specified object to a string.
Array.prototype.sort()
now works on all platforms. It no longer converts undefined elements to null and sorts them to the high end of the array.String.prototype.split()
- It can take a regular expression argument, as well as a fixed string, by which to split the object string.
- It can take a limit count so that it won't include trailing empty elements in the resulting array.
String.prototype.substring()
: no longer swaps index numbers when the first index is greater than the second.toString()
: now converts the object or array to a literal.- The
break
andcontinue
statements can now be used with the new labeled statement.