JS: ECMAScript 2026
getOrInsert , getOrInsertComputed for map and weak map
new methods
Map.prototype.getOrInsertMap.prototype.getOrInsertComputed
also in weakmap.
WeakMap.prototype.getOrInsertWeakMap.prototype.getOrInsertComputed
Float16Array
Float16Array
Math.sumPrecise
Math.sumPrecise
Sums numbers while minimizing floating-point precision loss
console.log(Math.sumPrecise([3, 4, 5])); // 12
Iterator.concat
Iterator.concat
concatenates iterators
Iterator.zip
Iterator.zip
(ai answer)
Key New Features
Array.fromAsync-
Creates an array from an async iterable (e.g., streams, paginated APIs).◆
const arr = await Array.fromAsync(asyncIterable);
Uint8ArrayBase64 & Hex methods-
Native
toBase64(),fromBase64(), hex conversions (and similar).◆ No morebtoa/atobhacks or third-party libs for binary data.
Error.isError-
Reliable way to check if something is truly an
Error(works across realms/iframes/workers).◆ Fixesinstanceof Errorpitfalls.
- JSON improvements
-
Reviver access to source text in
JSON.parse;JSON.rawJSONfor betterstringifycontrol.◆ Safer handling of large numbers and precise JSON round-tripping.
Other Notable Mentions (Depending on Exact Cutoff)
Some sources also reference features that reached Stage 4 around the same time or were expected:
- Iterator helpers (
.map(),.filter(),.take(), etc. on iterators) Promise.try()RegExp.escape()- Float16 support (
Float16Array,Math.f16round) - In some reports: progress toward Temporal (modern
Datereplacement) and explicit resource management (using/await using)