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.
- Iterator helpers ECMAScript
- Import attributes ECMAScript
- RegExp
v
flag with set notation and properties of strings ECMAScript - Finding elements in
Array
s and TypedArrays ECMAScript at
method for relative indexing ECMAScript- Error causes ECMAScript
Object.hasOwn
ECMAScript- Import assertions ECMAScript
- Private brand checks a.k.a.
#foo in obj
ECMAScript - Class static initialization blocks ECMAScript
- WebAssembly integration with JavaScript BigInt WebAssembly ECMAScript
Atomics.wait
,Atomics.notify
,Atomics.waitAsync
ECMAScript ES2020- Logical assignment ECMAScript ES2021
Intl.DisplayNames
Intl- Fast, parallel applications with WebAssembly SIMD WebAssembly
- RegExp match indices ECMAScript
String.prototype.replaceAll
ECMAScript ES2021- Top-level
await
ECMAScript - Nullish coalescing ECMAScript ES2020
- Optional chaining ECMAScript ES2020
- Subsume JSON a.k.a. JSON ⊂ ECMAScript ES2019
Intl.NumberFormat
IntlglobalThis
ECMAScript ES2020- Weak references and finalizers ECMAScript ES2021
- Stable
Array.prototype.sort
ECMAScript ES2019 Symbol.prototype.description
ECMAScript ES2019Object.fromEntries
ECMAScript ES2019- Promise combinators ECMAScript ES2020 ES2021
Array.prototype.flat
andArray.prototype.flatMap
ECMAScript ES2019- Numeric separators ECMAScript ES2021
String.prototype.matchAll
ECMAScript ES2020Intl.ListFormat
Intl- Module namespace exports ECMAScript ES2020
- Public and private class fields ECMAScript ES2022
Intl.RelativeTimeFormat
Intl- Well-formed
JSON.stringify
ECMAScript ES2019 - JavaScript modules ECMAScript ES2015
- BigInt: arbitrary-precision integers in JavaScript ECMAScript ES2020
- Optional
catch
binding ECMAScript ES2019 String.prototype.trimStart
andString.prototype.trimEnd
ECMAScript ES2019- Revised
Function.prototype.toString
ECMAScript ES2019 - Dynamic
import()
ECMAScript ES2020 Promise.prototype.finally
ECMAScript ES2018Intl.PluralRules
Intl- Object rest and spread properties ECMAScript ES2018