skip to content

ECMAScript Editions and TC39

Why ES2015 was the break, what stage 3 means for shipping, and why a feature in the spec can be missing from your engine. Asked to test how you judge what is safe to use.

part ofJavaScriptread it →
on this pageshow

questions

6

How do JavaScript, ECMAScript and the ECMA-262 specification relate to an engine, and why can a specified feature be missing from your runtime?

level: juniorimportance: must knowfreq 40%

answer

  1. a document versus running software
  2. the committee, the standard, the implementers
  3. host embeds one engine version
  4. feature by feature, not edition by edition
  5. check what your users actually run

basics

~20 s

ECMAScript, defined in ECMA-262, is the written standard for JavaScript, and engines such as V8 implement it. Publishing a feature in the standard installs nothing, so your runtime has it only once its engine version ships it.

solid answer

~50 s

ECMA-262 is the document that defines ECMAScript, the standardized core of JavaScript, and TC39 is the Ecma committee that maintains it. It states requirements and runs nothing. Engines such as V8, SpiderMonkey and JavaScriptCore implement those requirements, and a host such as a browser or Node embeds one engine at a particular version. So "is it in the spec?" and "can I run it?" are separate questions. Engines generally ship features one at a time on their own schedules rather than edition by edition, so a feature can be in the standard yet absent from an older browser, a pinned Node release or an engine that has not got to it. The reverse also happens: features often ship before the edition naming them is published. What to check is support in the engine versions your users actually run, not the edition number.

go deeper

for a junior

Keep the layers straight: ECMA-262 is a document, ECMAScript is what it defines, TC39 writes it, an engine implements it, and a host embeds the engine. A feature in the document is not yet a feature on your machine.

for a middle

Explain the chain between the text and running code: engine team, host release, then the upgrade. Know that engines ship per feature, so edition numbers do not describe a runtime.

for a senior

Treat this as a support question about a concrete population of runtimes. Ask which browsers and Node releases run the code and check per-feature data, rather than quoting an edition.

for a principal

The tradeoff is who carries the cost of old runtimes. Decide which versions your product commits to supporting, because that decision, not the specification, sets what the team may use natively.

## Four words that are easy to blur - **JavaScript** is the language people write. In a browser the word is often an umbrella for the core language plus the web APIs around it. - **ECMAScript** is the name of the standardized core language: syntax, types, built-in objects such as `Array` and `Math`, strict mode, the module system. - **ECMA-262** is the specification document that defines ECMAScript, published by Ecma International and also approved by ISO as ISO 16262. - **TC39** is the Ecma technical committee that evolves the language and authors that specification. Then come the things that actually run code. - An **engine**, such as V8, SpiderMonkey or JavaScriptCore, parses and executes JavaScript and implements the specification's requirements. - A **host**, such as a browser or Node, embeds an engine at a specific version and adds its own APIs around it. ECMA-262 is written for people implementing engines, and it is not a tutorial for people writing scripts. It also has edges. It does not describe the DOM, which is standardized elsewhere, and the internationalization API has its own specification, ECMA-402. So a missing API is not always an engine question at all, though this page stays with the language core. ## Why a specified feature can be missing A specification is a set of requirements, and nothing in it updates the software on anyone's machine. Between the text and your running code sit several independent decisions: 1. **The engine team decides when to implement it.** Each engine has its own priorities and release schedule. 2. **The host decides which engine version to embed.** A browser release or a Node release fixes that version. 3. **The operator or user decides when to upgrade.** A server may be pinned to an old Node release, and a customer may keep an old browser or device for years. So a very common explanation for a `TypeError` on a specified method, or a `SyntaxError` on specified syntax, is simply that the engine version running that code predates the feature. TC39 develops a new feature as a proposal that climbs a series of stages. A proposal-sized feature normally cannot reach Stage 4, the last step before standardization, without two compatible implementations that pass **Test262**, the official conformance test suite for ECMAScript. That sets a floor, not a promise of universal support. It shows that two implementations exist somewhere. It says nothing about the third engine, and nothing about the version your customer has. ## Support is not all-or-nothing per edition Saying that a runtime "supports ES2020" is loose shorthand. Engines generally ship features individually, so at a given moment an engine can have most of one edition, part of the next, and something from a proposal that has not yet reached any edition. | Claim | Is it reliable? | |---|---| | This feature is in ES2022, so current browsers have it | No. Check each engine and version you target | | This engine has a feature from ES2023, so it has all of ES2022 | No. Features do not ship in edition order | | This feature is not in any edition yet, so no engine has it | No. Engines typically implement at stage 3 or stage 4 | | This browser version maps to one edition | No. Versions and editions are unrelated numbering schemes | The third row is the one people find surprising. Engines implementing before publication is the design of the process, because implementation experience is the evidence that a proposal needs in order to finish. By the time an edition is approved, its features have usually been running somewhere for a while. ## How to get a real answer When someone asks whether a language feature is available, break the question down: - **Which runtimes?** List the browsers, devices and Node releases that will actually run this code. - **Which engine versions do they carry?** Compatibility tables in the reference documentation report per feature and per version, which is the granularity that matters. - **What happens where it is missing?** The answer differs for syntax and for runtime APIs, and that is a decision of its own. Reasoning from the edition number skips all three questions, which is why it produces confident wrong answers.

  • If Stage 4 requires two implementations, how can a standardized feature still be missing?
    Two compatible implementations is a floor for the process, not a promise of universal support. A third engine may not have implemented it yet, and even engines that have will not reach users on older versions. Your users' browsers and your pinned Node release decide what runs.
  • Does ECMA-262 define the DOM?
    No. The ECMAScript specification covers the core language: syntax, types and built-ins such as `Array` and `JSON`. The DOM is standardized separately, and the host exposes it to scripts. So something that works in every browser is not necessarily part of ECMAScript at all.
  • Why might a runtime stay without a feature even after its engine project has shipped it?
    A host embeds one engine version, so the feature arrives only with a host release that carries a new enough engine. Then someone still has to upgrade. A server pinned to an older Node release, or a customer on an old browser, stays without it indefinitely.

ECMA-262 is like a published cookbook and engines are restaurants. Printing a recipe puts no dish on any menu: each kitchen adds it when it chooses, some before the book is out, and your customer eats at whichever branch they happen to be in.

  • If a feature is in the latest edition, every current browser supports it.
  • Engines implement one whole edition at a time, so support for an edition is all or nothing.
  • ECMA-262 also defines the DOM and the document object.
  • Nothing can be used anywhere until its edition has been published.
  • A browser's version number maps to exactly one ECMAScript edition.
  • Stage 4 means every major engine has shipped the feature.
open as a page

For "can I use X" in JavaScript, how do you choose among feature detection, transpiling and polyfilling, and what can each not do?

level: middleimportance: must knowfreq 38%

basics

~20 s

First ask whether X is syntax or a runtime API. Syntax must be parsed natively or transpiled; no polyfill or runtime check can supply it. A missing API can be detected at runtime and then polyfilled or worked around.

open as a page

In JavaScript's ECMAScript history, why is ES2015 treated as the break, and what changed about how editions are named and released afterwards?

level: juniorimportance: should knowfreq 34%

basics

~20 s

ES2015, also called ES6, was the first large edition since ES5 in 2009 and added syntax older engines could not parse. Since then editions are named by year and published annually, each collecting the proposals that finished in time.

open as a page

In the TC39 process for JavaScript proposals, what are the stages, and what does each one promise about a proposal's stability?

level: middleimportance: should knowfreq 36%

basics

~20 s

TC39 proposals move through six stages: 0, 1, 2, 2.7, 3 and 4. Stability rises along the way: Stage 2 may change significantly, Stage 3 changes only if forced, and Stage 4 is finished and headed for the standard.

open as a page

If a teammate asks whether shipping a stage 3 TC39 JavaScript proposal to production is safe, how do you answer and what do you check?

level: seniorimportance: should knowfreq 30%

basics

~20 s

Stage 3 means the design is complete and implementation is recommended, not finished: web compatibility or production feedback can still change it. Safety depends on syntax versus API, which engines ship it, and the cost of backing out.

open as a page

As lead of a JavaScript codebase, what standing rule would you set for adopting syntax from proposals before TC39 Stage 4, and what do you weigh?

level: principalimportance: nice to knowfreq 20%

basics

~20 s

Set the rule by stage and blast radius: default to Stage 4 syntax your targets can run, allow Stage 3 by recorded exception with an owner and exit plan, and keep anything earlier out of shipped code.

open as a page