ECMAScript
ECMAScript is the written standard that defines the JavaScript language: its syntax, its types, and its built-in objects. JavaScript is the name everyone uses for the language that engines implement from that standard.
Detailed Explanation
The split exists for a trademark reason. Netscape shipped JavaScript in 1995, the name was owned by Sun and later Oracle, and when the language was handed to a standards body it needed a neutral title. Ecma International publishes it as ECMA-262, the ECMAScript Language Specification. In practice, "ECMAScript 2020" is the version of the rulebook and "JavaScript" is the language you write.
Knowing what the specification does not cover is more useful than knowing what it does. ECMAScript defines Array, Promise, Math, class, and the semantics of this. It does not define document, fetch, setTimeout, localStorage, or require. Those come from the host: the WHATWG HTML standard in browsers, or Node's own API surface on the server. This is why Array.prototype.map works identically everywhere while setTimeout returns a number in browsers and a Timeout object in Node.
Versions ran ES1 through ES5 on no fixed schedule, with ES5 landing in 2009 after the abandoned ES4 effort. ES2015 (widely called ES6) was the large one: let, const, classes, arrow functions, modules, promises, template literals, destructuring. Since then the committee has shipped a smaller release every June, named by year — ES2016 through ES2026. Anyone still saying "ES7" or "ES8" is using a naming scheme the committee dropped.
Changes go through TC39, the technical committee. A proposal climbs five stages, from stage 0 (an idea) to stage 4 (in the standard). Stage 4 requires spec text, a full test suite in test262, and two shipping implementations. That gate is why most new JavaScript features already work in a browser before the year's spec is published.
The engines do the actual work: V8 (Chrome, Edge, Node, Deno), SpiderMonkey (Firefox), JavaScriptCore (Safari, Bun). They add features independently, so support is per engine version, not per spec year.
That leads to the only part of this that costs you anything. If you need to run on older engines, you have two separate problems. New syntax must be transpiled, usually by Babel, SWC, or tsc with a lower target, because an engine that cannot parse ?. throws a SyntaxError and abandons the whole file before running a line. New built-ins like Object.hasOwn must be polyfilled, because they are ordinary functions that can be added at runtime. Transpiling costs build time and output size; polyfills cost bytes on every page load. Targeting a modern baseline, roughly ES2020 and later, removes most of that overhead.
Code Examples
Built-ins can be feature-detected at runtime, because they are just properties.
// Built-ins can be feature-detected at runtime, because they are just properties.
const hasAt = typeof Array.prototype.at === "function"; // Array.prototype.at is ES2022
console.log(hasAt); // => true on Node 16.6+ and 2022-era browsers
// Syntax cannot be detected this way. An engine that does not understand
// `?.` fails to parse the entire file, so no check inside it ever runs.
const settings = { retries: 3 };
console.log(settings?.retries ?? 5); // => 3 (optional chaining + nullish coalescing, ES2020)# Which features you get depends on the engine version, not on the spec year.
node -p "process.version" # => v20.11.1
node -p "process.versions.v8" # => 11.3.244.8-node.17 (the engine that decides support)Common Gotchas
ES6 and ES2015 are the same release
the committee switched to year-based names after ES2015, so "ES6" is a legacy nickname for one specific version and "ES7"/"ES8" are not real spec names. Say ES2016 and ES2017.
Transpiling and polyfilling are different jobs
a transpiler rewrites syntax you wrote, but it cannot invent `structuredClone` or `Array.prototype.flat` for you. Missing built-ins need a polyfill loaded before your code runs.
Unsupported syntax fails at parse time, not at the point of use
guarding a modern operator behind an `if` does not help. The engine rejects the file with a `SyntaxError` before executing anything, so the guard never gets a chance.
The spec is not the documentation
ECMA-262 is written for engine implementers. Read MDN to learn a feature, and open the specification only when you need the exact evaluation order or coercion steps.