Skip to content
Tutorials Center
My learning

Topics

JavaScript Reference ยท Practical Pages

ECMAScript versions: ES2015 to ES2025

Concept page listing the main JavaScript features added in each ECMAScript edition from ES2015 to ES2025, with runnable feature checks and links to references.

JavaScript is the language; ECMAScript is the standard that defines it, published as numbered editions. Until 2015 editions were rare (ES3 in 1999, ES5 in 2009). Since ES2015 (also called ES6) the committee, TC39, ships a new edition every year, containing whatever proposals reached Stage 4 by then.

An edition number tells you when a feature was standardized, not whether every browser has it: engines implement features one at a time, often before and sometimes after the edition is published. This page is a map from year to feature, with links to the reference pages.

Features by edition

Edition Main additions
ES2015 let and const, arrow functions, classes, template literals, destructuring, default and rest parameters, spread, modules, Promise, Map, Set, Symbol, generators, for...of, Proxy, Reflect
ES2016 Array.prototype.includes(), the ** exponent operator
ES2017 async/await, Object.values(), Object.entries(), padStart(), padEnd(), trailing commas in parameter lists
ES2018 Object rest and spread, async iteration (for await...of), Promise.prototype.finally(), regex named groups, lookbehind, the s flag
ES2019 flat(), flatMap(), Object.fromEntries(), trimStart(), trimEnd(), optional catch binding, stable Array.prototype.sort()
ES2020 BigInt, ??, ?., Promise.allSettled(), globalThis, dynamic import(), String.prototype.matchAll()
ES2021 replaceAll(), Promise.any(), logical assignment (&&=, ||=, ??=), numeric separators, WeakRef
ES2022 Class fields and private members, static blocks, top-level await, at(), Object.hasOwn(), Error cause
ES2023 findLast(), findLastIndex(), toSorted(), toReversed(), toSpliced(), with(), hashbang syntax
ES2024 Object.groupBy(), Map.groupBy(), Promise.withResolvers(), resizable ArrayBuffer, the regex v flag, isWellFormed()
ES2025 Iterator helpers, new Set methods (union(), intersection(), ...), Promise.try(), JSON modules, regex modifiers, Float16Array

Later editions added further small features (for example RegExp.escape(), Error.isError() and Math.sumPrecise()) and some proposals, such as using declarations and Temporal, shipped in engines on their own schedule. Check a compatibility table for anything newer than a few years.

Detecting what you have

Feature detection looks at the API itself, never at the browser name. For methods, test typeof:

JS A small feature report

Press Run (or Ctrl + Enter) to see the console output here.

No output.

New syntax cannot be feature-detected with typeof, because a browser that does not know the syntax fails to parse the whole file. Tools such as Babel or esbuild compile newer syntax down to a target you choose, and polyfills supply missing APIs.

Old and new side by side

The same job, written with ES5 tools and with later editions:

JS ES5 versus modern

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Usage notes

  • Edition names. "ES6" means ES2015, "ES7" ES2016, and so on. Prefer year names; they are unambiguous.
  • "ESNext" means "whatever is newest", not a fixed version.
  • Stages. Proposals go from Stage 0 to Stage 4; Stage 4 means finished and ready for the next edition, Stage 3 means implement and test it, and earlier stages may still change.
  • Baseline. Reference sites label features "widely available" or "newly available" to help you judge support across the major browsers.
  • Backward compatibility is a rule. Old code keeps working, so var, with (in sloppy mode) and the like remain, and new features avoid breaking them.
  • Node.js and browsers differ. A feature may exist in one runtime long before the other; check the one you target.
  • Strict mode and modules are opt-in behavior changes; modules are always strict.

Browser support

Everything up to roughly ES2022 is available in all current browsers. Features from ES2023 onward arrived over time, and the newest ones (iterator helpers, new Set methods, Promise.try() and later) may be missing in older versions, so check a compatibility table for the browsers you must support.