What's New in JavaScript

This document lists new features in JavaScript that are supported in both Edge mode, Windows 8.x Store, and Windows Phone Store apps.

To find out which JavaScript elements are supported in Edge mode but deprecated in Windows 8.x Store apps, see Version Information.

Important

For information about how to create Windows 8.x Store and Windows Phone Store apps using JavaScript, including information about the Visual Studio JavaScript editor and other features, see Develop Windows Store apps using Visual Studio 2013.

New features in JavaScript

Feature Description
Classes New syntax supports declaration of classes.
Promises Promises allow easier and cleaner asynchronous coding. Promise constructors are supported, along with the all and race utility methods.
Iterators Now you can iterate over iterable objects (including arrays, array-like objects, and iterators), invoking a custom iteration hook with statements to be executed for the value of each distinct property. For more information, see Iterators and Generators. Note: Generators are not yet supported.
Arrow functions The arrow function (=>) provides shorthand syntax for the function keyword which features a lexical this binding.
New methods for built-in objects The Array Object, Math Object, Number Object, Object Object, and String Object built-in objects include many new utility functions and properties for manipulating and inspecting data.
Object literal enhancements Objects now support computed properties, concise method definitions, and shorthand syntax for properties whose value is initialized to a same-named variable. For more information, see Creating Objects.
Proxies Proxies enable custom behavior for objects.
Rest parameters Rest parameters allow you to turn consecutive arguments in a function call to an array. For more information, see Functions.
Spread operator The spread operator (...) expands iterable expressions into individual arguments. For example, a.b(...array) is approximately the same as a.b.apply(a, array).
Symbols Symbol objects allow properties to be added to existing objects with no possibility of interference with the existing object properties, with no unintended visibility, and with no other uncoordinated additions by other code.
Template strings Template strings are string literals that allow for expressions to be evaluated and concatenated with the string literal.
Unicode enhancements Improvements have been made to Unicode support. For example, a new escape sequence format supports astral code points (code points with more than four hexadecimal digits). For more information, see Special Characters.
WeakSet A WeakSet is a collection of objects that will be garbage collected if they are not referenced anywhere else.

See Also

JavaScript Language Reference