JavaScript 1.1
Netscape Navigator 3.0 was released on August 19, 1996, and was the second major release of the javascript-enabled browser.
1.1 new features
New object
- Array
- Boolean
- Function
- Number
New attributes
- Number.MAX_VALUE
- Number.MIN_VALUE
- NaN
- Number.NEGATIVE_INFINITY
- Number.POSITIVE_INFINITY
New method
- Array.prototype.join()
- Array.prototype.reverse()
- Array.prototype.sort()
- Array.prototype.split()
The new operator
- typeof
- void
Other new features
1.1 Modified Functions
- Object deletion: You can delete an object by setting its reference to NULL.
- Added object constructors and stereotype properties
- Eval () is now a method on each object (previously a built-in function) that executes a string of JavaScript code in the context of a given object.
- Math.random() now works on all platforms.
- ToString () : Added a radix as an argument that specifies the base to represent values.
- IsNaN () now works on all platforms. (No longer works only on Unix)
- NaN is returned on all platforms when the first character of the string (parameter) specified by parseFloat() and parseInt () cannot be converted to a number. (In previous releases, they returned NaN on Solaris and Irix and 0 on other platforms)
JavaScript 1.2
Netscape Navigator 4.0 was released on June 11, 1997, and is the third major release of the javascript-enabled browser.
1.2 new features
New object
- Objects can be created using concise literal notation. (Concise syntax inspired by Python 1.x Dictionary)
- Numbers can also be created using concise literal notation. (Inspired by the concise syntax of the Python 1.x word list)
- arguments
New attributes
- Function.arity
New method
- 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()
The new operator
- delete
- Equality operators (== and ! =)
New statement
- Labeled statement
- switch
- do… while
- import
- export
Other new features
- Regular Expressions
- Signed scripts
1.2 Modified Functions
- Now you can nest functions inside functions.
- Number can now convert the specified object to a Number.
- If x is a string that does not contain a well-formed numeric literal, Number will generate a NaN instead of an error.
- Stirng can now convert the 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 largest position in the array.
- String.prototype.split()
- It can take either a definite string argument to split the target string, or a regular expression argument.
- It can take a limited number so that the final result array no longer contains empty elements after that.
- String. The prototype. The substring () : no longer requires the second index value is greater than the first.
- ToString (): It is now possible to convert objects or arrays to text.
- The break and continue statements can now be used in tagged statements.
JavaScript 1.3
Netscape Navigator 4.5 was released on October 19, 1998.
1.3 new features
New global variable
- NaN
- Infinity
- undefined
New method
- isFinite()
- Function.prototype.call()
- Function.prototype.apply()
- Date.UTC()
- Date.prototype.getFullYear()
- Date.prototype.setFullYear()
- Date.prototype.getMilliseconds()
- Date.prototype.setMilliseconds()
- Date.prototype.getUTCFullYear()
- Date.prototype.getUTCMonth()
- Date.prototype.getUTCDate()
- Date.prototype.getUTCHours()
- Date.prototype.getUTCMinutes()
- Date.prototype.getUTCSeconds()
- Date.prototype.getUTCMilliseconds()
- Date.prototype.toUTCString()
- Date.prototype.setUTCFullYear()
- Date.prototype.setUTCMonth()
- Date.prototype.setUTCDate()
- Date.prototype.setUTCHours()
- Date.prototype.setUTCMinutes()
- Date.prototype.setUTCSeconds()
- Date.prototype.setUTCMilliseconds()
Other new features
- Strict equality operator
- Support Unicode
- Introduces a JavaScript console
JavaScript 1.3 modified functionality
- Modify theDateMake it ecMA-262 compliant
- New constructor: Date(year, month, day, [,hours [, minutes [, seconds [, milliseconds ]]]])
- Additional method parameters
- setMonth(month[, date])
- setHours(hours[, min[, sec[, ms]]])
- setMinutes(min[, sec[, ms]])
- setSeconds(sec[, ms])
- The length of the array (the length of the property) is now of type 32 bit unsigned integer.
- Array.prototype.push(): In JavaScript 1.2, the push method returns the last element to be added to the Array. Under JavaScript 1.3, push returns the new length of the array.
- Array.prototype.slice(): In JavaScript 1.2, if only one element is removed (howMany is 1, the splice method returns the removed element. In JavaScript 1.3, the splice method usually returns an array of deleted elements. If only one element is removed, an array containing only one element is returned.
- Change to string.prototype.replace ().
- Boolean object changes.
- ToString () changes.
New features in JavaScript 1.4
Below is an update to JavaScript 1.4, which is only available for the Netscape server-side JavaScript released in 1999. Old Netscape documents can be found at archive.org.
- Exception handling (throw and try… catch)
- The in operator.
- The instanceof operator
JavaScript 1.4 feature changes
- Eval () (cannot be invoked indirectly and is no longer a method of Object)
- Arguments is no longer a function attribute
- Function. Arity is abolished in favor of function.length
- LiveConnect changes
New features in JavaScript 1.5
Below is the JavaScript 1.5 update log. This version was included in Netscape Navigator 6.0 released on November 14, 2000, and is also used in subsequent Netscape Navigator releases and Firefox 1.0. You can compare JavaScript 1.5 to JScript Version 5.5 and Internet Explorer 5.5, which was released in July 2000. The corresponding ECMA standard is ECMA-262 Edition 3 (since December 1999).
- Number.prototype.toExponential()
- Number.prototype.toFixed()
- Number.prototype.toPrecision()
- const
- try… Multiple catch statements are supported in a catch statement.
- JavaScript developers can add getters and setters to objects
JavaScript 1.5 features changes
- Runtime errors are now reported as exceptions.
- Regular expression changes:
- Quantity modifiers – +, *,? And {} — can now follow? And then forced it into a non-greedy mode.
- “Non-capture parentheses “(? :x) can be used instead of “capture parentheses” (x). Backreferences are not available when using non-capture parentheses.
- Support positive – negative – zero – width assertions. Both make assertions based on the content immediately following the string.
- The addition of the M flag indicates that a regular expression can match multiple lines.
- Functions can be declared in an if statement.
- Functions can be declared in expressions.
New JavaScript 1.6 features
Here is the JavaScript 1.6 update log. JavaScript 1.6 was included in Firefox 1.5 (Gecko 1.8) released in November 2005. The corresponding ECMA standard for JavaScript 1.6 is ECMA-262 version 3 and ECMAScript for XML (E4X), which gives it some additional features. Some new features were introduced: E4X, several new array methods, and generics for arrays and strings.
New JavaScript 1.6 features
- Support documentation for ECMAScript for XML (E4X), which uses JavaScript to create and process XML content, has been added. More details: Use E4X to process XML.
- Array.prototype.indexOf()
- Array.prototype.lastIndexOf()
- Array.prototype.every()
- Array.prototype.filter()
- Array.prototype.forEach()
- Array.prototype.map()
- Array.prototype.some()
- Array generics
- String generics
- for each… in
JavaScript 1.6 features changes
- There is a bug that when the number of parameters or arguments is fixed, arguments[n] cannot be set if n is greater than that number.
JavaScript 1.7 is a language update that introduces a number of new features, especially generators, iterators, array comprehensions, let expressions, and deconstructed assignments.
In order to use some of the new features of JavaScript 1.7, you need to specify that you want to use JavaScript 1.7. In HTML or XUL code, use:
New features in JavaScript 1.7
The following is an update log for version 1.7 of javaScript, which was included in Firefox 2 (October 2006).
JavaScript 1.7 is a language update that introduces a number of new features, especially generators, iterators, array comprehensions, let expressions, and deconstructed assignments.
The following new JavaScript 1.7 features are not currently part of the ECMA-262 standard. These features are described in ECMAScipt6 in recent versions of Firefox. See these reference pages for details.
- Iterators and generators
- Array comprehensions
- Let declaration (Gecko 41 abandoned let declaration, see bug 1023609)
- Const statement
- (JS1.7-style for-in deconstruction is no longer supported in Gecko 40, see Bug 1083498)
New JavaScript 1.8 features
- Expression Closures.
- Generator expressions. Generator expressions allow you to easily create generators (introduced in JavaScript1.7). Often you need to create a custom function that contains yield to get a generator, and generator expressions allow you to use array-like syntax for the same purpose.
Array.prototype.reduce()
Array.prototype.reduceRight()
JavaScript 1.8 features updated
To the for… Modification of in deconstruction
One of the changes in JavaScript1.8 is a bug fix related to the array key-value structure introduced in JavaScript1.7. Previously, we could deconstruct an array’s keys by using for (var [key, value] in array). However, this also makes it impossible to deconstruct an array of arrays of keys and values (such as an iterator returning an array of current key-value pairs). Now the problem can be used for (var (key, value) in the Iterator (array) to solve (bug [366941] (bugzilla.mozilla.org/show_bug.cg… “FIXED: Get rid of the “for([key, value] in obj)” form so that normal array destructuring works in for.. In “)).
New in JavaScript 1.8.1
- Object.getPrototypeOf()
- Native JSON support
- String.prototype.trim()
- String.prototype.trimLeft()
- String.prototype.trimRight()
- String.prototype.startsWith()
JavaScript 1.8.1 features updated
Implicit property Settings in object and array initializers no longer perform setters in JavaScript. This makes the behavior of setting property values more predictable.
New features in JavaScript 1.8.5
The new function
Function Description object.create () uses specified prototype objects and attributes. Bug 492840 Object.defineProperty() adds attribute names for objects with given Description information. Object.defineproperties () adds multiple attribute names for the given description to the Object. Object. GetOwnPropertyDescriptor () returns an Object of the specified attribute name description information. Bug 505587 Object. The keys () returns the array of all the enumerable Object attributes. The bug 307791 Object. GetOwnPropertyNames () returns by all the enumerable Object and an array of enumeration attributes. Bug 518663 Object. PreventExtensions () to prevent any type of the Object extension. The bug 492849 Object.isextensible () determines whether an Object isExtensible. Bug 492849 object.seal () prevents other code from deleting Object properties. Bug 492845 object.issealed () Bug 492845 Object.freeze() Freezes an Object: Other code cannot delete or modify any attributes. Bug 492844 object.isfrozen () checks whether an Object isFrozen. Bug 492844 array.isarray () checks whether a variable is an Array. Bug 510537 Date.prototype.tojson () returns a Date object as a jSON-formatted string. Function.prototype.bind() creates a new Function that uses the provided context (given character sequence) when called. Bug 429507
ECMAScript5 new features
- get 和 setOperations are now allowed to be identified as numeric values or strings. [Bug 520696](Bugzilla.mozilla.org/show_bug.cg… “FIXED: Implement support for |{ get “string literal”() { /* … }, get 5.4() {/. 6.72: * /}, 3} | “)
- Function.apply() can accept any array-like object as a parameter list, not just real arrays.
- Support for strict mode
- Array.tostring () is now allowed on non-arrays, returning calls to its join() method if allowed, toString() method otherwise.
Feature changes in JavaScript 1.8.5
- ISO 8601 support in Date: The parse() method for Date objects now supports simple ISO 8601 formatting time strings.
- Global objects become read-only: NaN, Infinity, and undefined global objects become read-only in accordance with ECMAScript 5 standards.
- Obj. parent and obj.count are obsolete. Part of the reason is as follows: SpiderMonkey change du Jour: The special parent property has been removed Bug 551529 & Bug 552560.
- Json.parse () no longer supports comma endings.
other
ECMAScript 5 support
5.1, an older version of the standard on which JavaScript is based, was approved in June 2011.
www.ecma-international.org/publication…
ES2015
6 th Edition/June 2015 www.ecma-international.org/publication… www.ecma-international.org/ecma-262/6….
ES2016
7 th Edition/June 2016 www.ecma-international.org/publication… www.ecma-international.org/ecma-262/7….
reference
JavaScript update developer.mozilla.org/zh-CN/docs/…