New in JavaScript 1.7

The following is a changelog for JavaScript 1.7. This version was included in Firefox 2 (October 2006).

JavaScript 1.7 is a language update introducing several new features, in particular generators, iterators, array comprehensions, let expressions, and destructuring assignment.

Using JavaScript 1.7

In order to use some of the new features of JavaScript 1.7, you need to specify that you wish to use JavaScript 1.7. In HTML or XUL code, use:

HTML
<script type="application/javascript;version=1.7"></script>

When using the JavaScript shell, you need to set the version you wish to use using the -version 170 switch on the command line or using the version() function:

JavaScript
version(170);

The features that require the use of the new keywords "yield" and "let" require you to specify version 1.7 because existing code might use those keywords as variable or function names. The features that do not introduce new keywords (destructuring assignment and array comprehensions) can be used without specifying the JavaScript version.

New features in JavaScript 1.7

The following features added with JavaScript 1.7 were not part of an ECMA-262 standard at the time. In more recent Firefox versions, the implementation is updated to work with semantics as specified in ECMAScript Edition 6. Please see the reference pages for differences.

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/javascript/new_in_javascript/1.7

JavaScript Versions