@@ -62,16 +62,16 @@ Always prefer non-mutating methods:
6262| Version | Year | Key Features |
6363| ---------| ------| --------------|
6464| ES6 | 2015 | let/const, arrow functions, classes, destructuring, spread, Promises, modules, Symbol, Map/Set, Proxy, generators |
65- | ES2016 | 2016 | ` Array.includes() ` , exponentiation operator ` ** ` |
66- | ES2017 | 2017 | async/await, ` Object.values/entries ` , ` padStart/padEnd ` , trailing commas in function params, ` SharedArrayBuffer ` , ` Atomics ` , ` Object.getOwnPropertyDescriptors() ` |
67- | ES2018 | 2018 | Rest/spread for objects, ` for await...of ` , ` Promise.finally() ` , RegExp named capture groups, RegExp lookbehind assertions, RegExp ` /s ` dotAll flag, RegExp Unicode property escapes ` \p{} ` |
68- | ES2019 | 2019 | ` .flat() ` , ` .flatMap() ` , ` Object.fromEntries() ` , ` trimStart/End() ` , optional catch binding, ` Symbol.description ` , stable ` Array.sort() ` , well-formed ` JSON.stringify() ` |
69- | ES2020 | 2020 | Optional chaining ` ?. ` , nullish coalescing ` ?? ` , ` BigInt ` , ` Promise.allSettled() ` , ` globalThis ` , ` String.matchAll() ` , dynamic ` import() ` , ` import.meta ` |
70- | ES2021 | 2021 | ` String.replaceAll() ` , ` Promise.any() ` , ` AggregateError ` , logical assignment ` ??= ` ` || = ` ` &&= ` , numeric separators ` 1_000_000` , ` WeakRef ` , ` FinalizationRegistry` |
71- | ES2022 | 2022 | ` .at() ` , ` Object.hasOwn() ` , top-level await, private class fields ` #field ` , private methods ` #method() ` , static class fields, static initialization blocks, ` Error.cause ` , RegExp match indices ` /d ` flag |
72- | ES2023 | 2023 | ` .toSorted() ` , ` .toReversed() ` , ` .toSpliced() ` , ` .with() ` , ` .findLast() ` , ` .findLastIndex() ` , hashbang grammar ` #! ` , symbols as WeakMap keys |
73- | ES2024 | 2024 | ` Object.groupBy() ` , ` Map.groupBy() ` , ` Promise.withResolvers() ` , RegExp ` /v ` Unicode sets flag, ` String.isWellFormed() ` , ` String.toWellFormed() ` , resizable ` ArrayBuffer ` , ` ArrayBuffer.transfer() ` , ` Atomics.waitAsync() ` |
74- | ES2025 | 2025 | Iterator helpers (` .map() ` , ` .filter() ` , ` .take() ` , ` .drop() ` , ` .toArray() ` ), Set methods (` .union() ` , ` .intersection() ` , ` .difference() ` ), ` RegExp.escape() ` , ` Promise.try() ` , ` using ` / ` await using ` resource management, ` Array.fromAsync() ` , ` Error.isError() ` , ` Float16Array ` , ` Intl.DurationFormat ` , import attributes |
65+ | ES2016 | 2016 | Array.includes(), exponentiation operator ** |
66+ | ES2017 | 2017 | async/await, Object.values/entries, padStart/padEnd, trailing commas, SharedArrayBuffer, Atomics |
67+ | ES2018 | 2018 | Rest/spread for objects, for await...of, Promise.finally(), RegExp named groups, lookbehind, dotAll flag |
68+ | ES2019 | 2019 | .flat(), .flatMap(), Object.fromEntries(), trimStart/End(), optional catch binding, stable Array.sort() |
69+ | ES2020 | 2020 | Optional chaining ?. , nullish coalescing ??, BigInt, Promise.allSettled(), globalThis, dynamic import() |
70+ | ES2021 | 2021 | String.replaceAll(), Promise.any(), logical assignment ??= and or= , numeric separators 1_000_000 |
71+ | ES2022 | 2022 | .at(), Object.hasOwn(), top-level await, private class fields #field, static blocks, Error.cause |
72+ | ES2023 | 2023 | .toSorted(), .toReversed(), .toSpliced(), .with(), .findLast(), .findLastIndex(), hashbang grammar |
73+ | ES2024 | 2024 | Object.groupBy(), Map.groupBy(), Promise.withResolvers(), RegExp v flag, resizable ArrayBuffer |
74+ | ES2025 | 2025 | Iterator helpers (.map, .filter, .take), Set methods (.union, .intersection), RegExp.escape(), using/ await using |
7575
7676## Modernization Patterns
7777
0 commit comments