JavaScript and WebAssembly features
This section explains the latest new features in JavaScript, the programming language specified by ECMA-262 (ECMAScript) and ECMA-402 (the ECMAScript Internationalization API), and in WebAssembly (Wasm).
We aim to provide concise explanations of new language features with easy-to-understand code examples. For more in-depth documentation, please refer to the external links in each explainer.
- JavaScript's New Superpower: Explicit Resource Management ECMAScript
- Iterator helpers ECMAScript
- Import attributes ECMAScript
- RegExp
vflag with set notation and properties of strings ECMAScript - Finding elements in
Arrays and TypedArrays ECMAScript atmethod for relative indexing ECMAScript- Error causes ECMAScript
Object.hasOwnECMAScript- Import assertions ECMAScript
- Private brand checks a.k.a.
#foo in objECMAScript - Class static initialization blocks ECMAScript
- WebAssembly integration with JavaScript BigInt WebAssembly ECMAScript
Atomics.wait,Atomics.notify,Atomics.waitAsyncECMAScript ES2020- Logical assignment ECMAScript ES2021
Intl.DisplayNamesIntl- Fast, parallel applications with WebAssembly SIMD WebAssembly
- RegExp match indices ECMAScript
String.prototype.replaceAllECMAScript ES2021- Top-level
awaitECMAScript - Nullish coalescing ECMAScript ES2020
- Optional chaining ECMAScript ES2020
- Subsume JSON a.k.a. JSON ⊂ ECMAScript ES2019
Intl.NumberFormatIntlglobalThisECMAScript ES2020- Weak references and finalizers ECMAScript ES2021
- Stable
Array.prototype.sortECMAScript ES2019 Symbol.prototype.descriptionECMAScript ES2019Object.fromEntriesECMAScript ES2019- Promise combinators ECMAScript ES2020 ES2021
Array.prototype.flatandArray.prototype.flatMapECMAScript ES2019- Numeric separators ECMAScript ES2021
String.prototype.matchAllECMAScript ES2020Intl.ListFormatIntl- Module namespace exports ECMAScript ES2020
- Public and private class fields ECMAScript ES2022
Intl.RelativeTimeFormatIntl- Well-formed
JSON.stringifyECMAScript ES2019 - JavaScript modules ECMAScript ES2015
- BigInt: arbitrary-precision integers in JavaScript ECMAScript ES2020
- Optional
catchbinding ECMAScript ES2019 String.prototype.trimStartandString.prototype.trimEndECMAScript ES2019- Revised
Function.prototype.toStringECMAScript ES2019 - Dynamic
import()ECMAScript ES2020 Promise.prototype.finallyECMAScript ES2018Intl.PluralRulesIntl- Object rest and spread properties ECMAScript ES2018