Skip to the page

Modern JavaScript · mid

Modern JavaScript you will actually use (ES2022–ES2025)

The recent features worth using and naming in interviews are copy-returning array methods (ES2023), Object.groupBy and Promise.withResolvers (ES2024), and iterator helpers, the new Set methods, Promise.try, JSON modules and import attributes (ES2025) — all Baseline in current browsers.

The notes

What you must know

  • ES2022: at(), Object.hasOwn, class fields, #private, static blocks, top-level await, Error cause, RegExp match indices (/d).
  • ES2023: toSorted, toReversed, toSpliced, with; findLast and findLastIndex; symbols as WeakMap keys; hashbang lines.
  • ES2024: Object.groupBy and Map.groupBy, Promise.withResolvers, resizable ArrayBuffer, the RegExp v flag, String isWellFormed, Atomics.waitAsync.
  • ES2025: iterator helpers (map, filter, take, drop, flatMap, reduce, toArray, Iterator.from), Set methods (union, intersection, difference, symmetricDifference, isSubsetOf, isSupersetOf, isDisjointFrom), Promise.try, JSON modules and import attributes (import data from './x.json' with { type: 'json' }), RegExp modifiers, duplicate named capture groups, Float16Array and Math.f16round.
  • The year is when TC39 publishes the edition (each June). Browser support is a separate question: check Baseline on MDN.
  • Why they matter: copy methods suit React state; groupBy replaces reduce boilerplate; lazy iterators save memory on big data.

The red pen

Common traps: mistake → fix

  • Mistake: RegExp.escape is ES2025

    Fix: the TC39 finished-proposals table lists it for 2026.

  • Mistake: Listing ES2015 features (let, arrow functions, classes) as 'new'.

  • Mistake: Object.groupBy returns a normal object

    Fix: it returns a null-prototype object.

Easy to hard

Questions interviewers ask, easy to hard

  1. Which recent JavaScript features do you use?
  2. Why prefer toSorted over sort in a React state update?
  3. What are Object.groupBy and Promise.withResolvers?
  4. What are iterator helpers, and why are they lazy?
  5. How do you check whether a new feature is safe to ship?

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview