Chrome (dev) implements future JavaScript features
The ECMA committee is currently working on developing the next version of JavaScript, codenamed Harmony . It should be completed by the end of next year and will be the biggest update in the history of the language. The Chrome and V8 developers have already decided to implement some future JavaScript features in the Chrome browser ( developer version ).
In order to activate new features, you need to type chrome://flags in the latest release from the dev-channel and enable the Experimental JavaScript features .
Lexical scope . Now let is the new var . Standard var declarations are supplemented by let and const . Both are the correct ways to assign values to objects, in which the scope is distributed within a block, which eliminates the typical source of errors and strange behavior. The declaration of functions is now officially possible in the local scope as well, while the lexical scope is allowed (lexical scope is possible only in strict mode).
Collections Effective sets and associative arrays. Any element can be used as a key or value, including objects.
Weak maps . A special type of associative array for which the garbage collector determines when a key is no longer available, so a key-value pair can be automatically removed from the associative array.
Proxy object A proxy simulates an object or JavaScript function and allows you to customize almost any aspect of its behavior. The developers believe that this is a really powerful thing, which brings reflection (reflection) to a new level and can be used for various advanced abstractions and interfaces .