This translation is incomplete. Please help translate this article from English.
このJavaScriptの変更履歴はNetscape Navigator3.0~4.0に基づいています。旧Netscape Navigatorのドキュメントはarchive.orgにあります。 Netscape Navigator 4.0 は1997年6月にリリースされました。 Netscape Navigator 4.0 was the third major version of the browser with JavaScript support.
JavaScript versions
Netscape Navigator 4.0では JavaScript1.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. -->
1.2の新機能
New objects
- objectをリテラル記法を使って生成することが出来ます。(inspired by dictionary literal syntax from Python 1.x).
- 配列を作成するときにもリテラル機能を作成することが出来ます。 (inspired by list literal syntax from Python 1.x).
- arguments
新しく実装されたプロパティ
新しく実装されたメソッド
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()
新しい演算子
delete- Equality operators (
==and!=)
新しい構文
- Labeled statements
switchdo...whileimportexport
他の新機能
Changed functionality in JavaScript 1.2
- functionがネスト出来るようになりました
- Number now converts a specified object to a number.
- Number now produces
NaNrather than an error ifxis 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
breakandcontinuestatements can now be used with the new labeled statement.