What’s New in JavaScript (ES2026) Cheat Sheet

This page condenses the finished JavaScript features in ES2026, plus a recap of ES2025, into one scannable reference. You can also download the information as a printable cheat sheet:

Free Bonus: What's New in JavaScript (ES2026) Cheat Sheet

Get the What's New in JavaScript (ES2026) Cheat Sheet (PDF), a printable reference to Map upsert, JSON.parse source text, Iterator.concat, Array.fromAsync, Base64 and hex bytes, Error.isError, and an ES2025 recap:

What's New in JavaScript (ES2026) Cheat Sheet

Want a guided path instead of a reference? Start learning at realjs.com.

Upgrading

  • ES2026 covers proposals finished (Stage 4) for the 2026 spec
  • Check engines before you ship: Node, browsers
  • Temporal and using are Stage 4 but land in ES2027
Language: Shell Filename: Run the Latest Node.js
$ node --version
v26.13.0
$ npx node@26 script.mjs
Language: JavaScript Filename: Test for a Feature
typeof Math.sumPrecise;   // "undefined"
typeof Iterator.concat;   // "function"

Map Upsert

  • getOrInsert replaces the has, set, get dance
  • getOrInsertComputed runs the callback only if the key is missing
  • WeakMap has both methods too
Language: JavaScript Filename: Insert a Default Once
const groups = new Map();
groups.getOrInsert("a", []).push(1);
groups.getOrInsert("a", []).push(2);
groups;     // Map(1) { 'a' => [ 1, 2 ] }
Language: JavaScript Filename: Compute a Default Lazily
const m = new Map();
m.getOrInsertComputed("b", (k) => k + "!");
m;               // Map(1) { 'b' => 'b!' }

Iterator.concat

  • Chains iterables lazily into one iterator
Language: JavaScript Filename: Join Iterables
Iterator.concat([1, 2], new Set([3]))
  .map((n) => n * 2)
  .toArray();    // [ 2, 4, 6 ]

JSON.parse Source Text

Language: JavaScript Filename: Keep Big Integers Exact
JSON.parse(
  '{"id":12345678901234567890}',
  (key, val, { source }) =>
    typeof val === "number"
      ? BigInt(source)
      : val,
);
// { id: 12345678901234567890n }
Language: JavaScript Filename: Write a Number Verbatim
JSON.stringify({
  n: JSON.rawJSON("12345678901234567890"),
});
// '{"n":12345678901234567890}'

Array.fromAsync

Language: JavaScript Filename: Collect an Async Iterable
async function* gen() {
  yield 1;
  yield 2;
}
await Array.fromAsync(gen());
// [ 1, 2 ]
Language: JavaScript Filename: Await Promises and Map Them
await Array.fromAsync(
  [Promise.resolve(1), 2],
  (n) => n * 2,
);                // [ 2, 4 ]

Base64 and Hex Bytes

  • No more btoa and Buffer workarounds
  • Works on any Uint8Array, in browsers too
Language: JavaScript Filename: Encode and Decode
const bytes = new Uint8Array([72, 105]);
bytes.toBase64();           // "SGk="
bytes.toHex();              // "4869"
Uint8Array.fromBase64("SGk=");
// Uint8Array(2) [ 72, 105 ]
Uint8Array.fromHex("ff00");
// Uint8Array(2) [ 255, 0 ]
Language: JavaScript Filename: URL-Safe Base64
new Uint8Array([251, 255]).toBase64({
  alphabet: "base64url",
});                         // "-_8="

Error.isError

Language: JavaScript Filename: Check Errors Reliably
Error.isError(new TypeError("x")); // true
Error.isError({ message: "x" });   // false

Math.sumPrecise

Language: JavaScript Filename: Not in Node 26 Yet
// Stage 4 for ES2026, but Node 26 lacks it
typeof Math.sumPrecise;   // "undefined"
// Once shipped: exact, no drift
// Math.sumPrecise([0.1, 0.2, 0.3])

ES2025 Recap: Iterators and Sets

Language: JavaScript Filename: Iterator Helpers
[1, 2, 3, 4].values()
  .filter((n) => n % 2)
  .map((n) => n * 10)
  .take(2)
  .toArray();    // [ 10, 30 ]
Language: JavaScript Filename: Set Methods
const a = new Set([1, 2, 3]);
const b = new Set([2, 3, 4]);
a.union(b);          // Set(4) { 1, 2, 3, 4 }
a.intersection(b);   // Set(2) { 2, 3 }
a.difference(b);     // Set(1) { 1 }
a.isSubsetOf(b);     // false

ES2025 Recap: Promises and Modules

Language: JavaScript Filename: Promise.try
Promise.try(() => {
  throw new Error("x");
}).catch((e) => e.message);
// Promise resolves to "x"
Language: JavaScript Filename: JSON Modules
import data from "./d.json"
  with { type: "json" };
data;            // { a: 1 }

ES2025 Recap: Numbers

Language: JavaScript Filename: Float16 Typed Arrays
new Float16Array([1.337])[0];
// 1.3369140625
Math.f16round(1.337);
// 1.3369140625

ES2025 Recap: Regular Expressions

Language: JavaScript Filename: RegExp.escape
RegExp.escape("a.b*c");   // "\\x61\\.b\\*c"
Language: JavaScript Filename: Inline Modifiers
/(?i:a)b/.test("Ab");     // true
/(?i:a)b/.test("AB");     // false
Language: JavaScript Filename: Duplicate Named Groups
const re =
  /(?<y>\d{4})-\d\d|\d\d-(?<y>\d{4})/;
"2026-10".match(re).groups.y;   // "2026"
"10-2026".match(re).groups.y;   // "2026"

You can download this information as a printable cheat sheet:

Free Bonus: What's New in JavaScript (ES2026) Cheat Sheet

Get the What's New in JavaScript (ES2026) Cheat Sheet (PDF), a printable reference to Map upsert, JSON.parse source text, Iterator.concat, Array.fromAsync, Base64 and hex bytes, Error.isError, and an ES2025 recap:

What's New in JavaScript (ES2026) Cheat Sheet