JS: ECMAScript 2026

By Xah Lee. Date: . Last updated: .

getOrInsert , getOrInsertComputed for map and weak map

Float16Array

ai answer

Key New Features

Here's a summary of the main additions:

Array.fromAsync
Creates an array from an async iterable (e.g., streams, paginated APIs).◆ const arr = await Array.fromAsync(asyncIterable);
Math.sumPrecise
Sums numbers while minimizing floating-point precision loss (better for financial/math-heavy code).◆ Handles varying magnitudes more accurately than manual reduce.
Uint8Array Base64 & Hex methods
Native toBase64(), fromBase64(), hex conversions (and similar).◆ No more btoa/atob hacks or third-party libs for binary data.
Iterator.concat (and related sequencing)
Lazily concatenates multiple iterators. Also includes helpers like Iterator.zip.◆ Clean lazy data pipelines without unnecessary arrays.
Error.isError
Reliable way to check if something is truly an Error (works across realms/iframes/workers).◆ Fixes instanceof Error pitfalls.
JSON improvements
Reviver access to source text in JSON.parse; JSON.rawJSON for better stringify control.◆ 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:

JavaScript. ECMAScript New Features