Another way (not recommended) to do this is to use the deprecated
<script> elements, the latest JS version (JS1.8 in Mozilla 1.9) is used automatically (bug 381031, bug 385159).
- Expression Closures.
Changes in destructuring
for ( var [key, value] in array ). However, that made it impossible to destructure the values of an array - that were arrays (i.e., when an iterator returns an array of the current key-value pair). This has been resolved now. (bug 366941). One can, however, use
for ( var [key, value] in Iterator(array)).
© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.