Skip to content
Tutorials Center
My learning

Topics

Lesson 123 of 156 ยท Under the Hood

JavaScript Versions and History

A short history of JavaScript and ECMAScript, the headline features of every version from ES5 and ES2015 to today, how TC39 works, and how to check support.

Have you seen "ES6", "ES2015" and "ESNext" in job ads or library docs and wondered whether they're different languages? They aren't. They're names for versions of the standard that JavaScript follows. Knowing the versions helps you read older code, understand why some tutorials look so different from others, and decide which features you can safely use for your audience.

In this lesson you'll take a quick trip through JavaScript's history, learn what each major version added, see how new features are designed by a committee called TC39, and learn practical ways to check whether a feature works in the browsers your users have.

Born in ten days

In 1995, Netscape wanted a simple scripting language for its Navigator browser โ€” something designers and hobbyists could use to make pages interactive, next to the "serious" Java applets of the day. Brendan Eich wrote the first prototype in about ten days. It was called Mocha, then LiveScript, and was finally renamed JavaScript at launch, largely as a marketing tie-in with Java, which was very fashionable. Despite the name, the two languages have little in common.

Microsoft quickly built its own compatible version, JScript, for Internet Explorer 3 in 1996. Two browsers with two slightly different languages was a recipe for chaos, so Netscape handed the language to a standards body, Ecma International. The resulting standard, ECMA-262, describes a language called ECMAScript. (The name "JavaScript" is a trademark, now held by Oracle, so the standard couldn't use it.)

So: ECMAScript is the specification; JavaScript is the language that implements it, plus the browser and Node.js APIs around it. When people say "ES2020", they mean the 2020 edition of that specification.

The early editions: ES1 to ES5

Edition Year Highlights
ES1 1997 The first standard, based on Netscape's JavaScript 1.1
ES2 1998 Editorial changes to align with an ISO standard
ES3 1999 Regular expressions, try...catch, switch, do...while, more string and number methods
ES4 โ€” Abandoned in 2008: too big and too controversial
ES5 2009 Strict mode, JSON, forEach/map/filter/reduce, Object.create, getters and setters, Object.defineProperty, Array.isArray, bind()
ES5.1 2011 Small fixes, aligned with ISO

ES3 was the language of the web for a full decade. During that time, the web changed enormously anyway: Gmail and Google Maps (2004โ€“2005) showed what JavaScript-heavy "Ajax" apps could do, libraries like jQuery (2006) papered over browser differences, Google's fast V8 engine arrived with Chrome in 2008, and Node.js (2009) took JavaScript to servers.

ES4 tried to add classes, modules, static types and more all at once. The committee couldn't agree, and in 2008 it was dropped in favor of a smaller update (ES5) and a long-term plan code-named "Harmony". Many ES4 ideas came back later, one at a time, in ES2015 and beyond.

ES5 is still worth recognizing, because a lot of older code โ€” and the output of some build tools โ€” is written in it (Legacy JavaScript shows how to read it). Strict mode and JSON both date from this edition.

ES2015: the big one

ES2015, also called ES6, was the largest update in the language's history. It changed how almost everyone writes JavaScript:

Here is the same small task written in typical ES5 and in modern JavaScript. Both run in today's browsers โ€” old code keeps working, which is one of the web's most important promises.

JS ES5 vs modern JavaScript

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

No output.

One edition every year

After ES2015, the committee switched to a yearly release train. Each June, Ecma publishes a new edition containing whatever features were finished by early that year. No more giant, decade-long releases; features ship when they're ready. That's also why people moved from numbers (ES6, ES7) to years (ES2015, ES2016).

Here are the headline features of each edition:

Edition Highlights
ES2016 Array.prototype.includes(), the ** exponent operator
ES2017 async/await, Object.values()/entries(), padStart()/padEnd(), SharedArrayBuffer and Atomics
ES2018 Object rest/spread, async iteration (for await...of), Promise.prototype.finally(), regex named groups and lookbehind
ES2019 flat()/flatMap(), Object.fromEntries(), trimStart()/trimEnd(), optional catch binding, stable sort()
ES2020 BigInt, ?? and ?., Promise.allSettled(), globalThis, dynamic import(), matchAll()
ES2021 replaceAll(), Promise.any(), logical assignment (&&=, ||=, ??=), numeric separators (1_000_000), WeakRef
ES2022 Public and private class fields, static blocks, top-level await in modules, .at(), Object.hasOwn(), Error cause
ES2023 findLast()/findLastIndex(), copying array methods toSorted(), toReversed(), toSpliced(), with()
ES2024 Object.groupBy()/Map.groupBy(), Promise.withResolvers(), resizable ArrayBuffer, the regex v flag, String.prototype.isWellFormed()
ES2025 Iterator helpers (.map(), .filter(), .take() on iterators), new Set methods (union(), intersection()โ€ฆ), Promise.try(), JSON modules with import attributes, regex modifiers, Float16Array
ES2026 Smaller additions such as RegExp.escape(), Error.isError(), Math.sumPrecise(), Array.fromAsync(), Iterator.concat(), Base64/hex helpers on Uint8Array and access to the source text in JSON.parse()

You don't need to memorize this table. It's useful as a map: when a tutorial uses var and function everywhere, it was probably written before 2015; when code uses ?., it targets browsers from 2020 onward.

What about Temporal? The Temporal API followed the same process: it spent years at Stage 3 while browsers implemented it, then shipped in Firefox (2025) and Chrome/Edge (2026). Browsers often ship a feature before the edition that formally contains it is published.

How new features are made: TC39

The standard is maintained by TC39 (Technical Committee 39 of Ecma International). Its members are browser makers, large tech companies, universities and invited experts, and they meet about every two months. All proposals live publicly on GitHub, so anyone can follow, comment on, or even propose a feature.

Every proposal moves through numbered stages:

Stage Meaning
0 An idea someone wants to discuss
1 The committee agrees the problem is worth solving; a champion explores solutions
2 A preferred design is chosen and draft spec text exists
2.7 The full spec text is approved; tests are being written
3 Recommended for implementation; browsers ship it (sometimes behind flags) and report problems
4 Finished: tests exist and at least two compatible implementations have shipped. It goes into the next edition

The practical rule: Stage 4 is safe, Stage 3 is close, and anything earlier can still change completely. If you see a blog post excited about a Stage 1 proposal, enjoy the ideas but don't use them in production code.

A key design rule shapes every proposal: don't break the web. A change that would break existing websites is rejected, even if it fixes a mistake. That's why typeof null is still "object", and why some new methods have slightly odd names โ€” includes() exists instead of contains() partly because old libraries had added a conflicting contains.

Checking support

Knowing which edition added a feature tells you its age, not whether your users have it. Browsers implement features individually, often before the edition is published. Here's how professionals decide:

  • Compatibility tables. Sites like Can I use and MDN's browser compatibility tables list the first version of each browser that supports a feature.
  • Baseline. Many reference sites now show a Baseline label. "Newly available" means the feature works in the current versions of all major browsers (Chrome, Edge, Firefox, Safari); "widely available" means it has worked everywhere for about 30 months. Widely available features are a safe default for most sites.
  • Your own analytics. If 99.8% of your visitors use browsers from the last two years, that's your real target.
  • Feature detection in code, for anything newer.

Feature detection in practice

For new APIs โ€” methods and objects โ€” check whether they exist before using them, and fall back gracefully. New syntax is harder: an old browser can't even parse a file that uses it, so the whole script fails. For syntax, rely on compatibility data or a build step that rewrites it.

JS What does this browser support?

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

No output.

Notice that the checks look at the API (typeof [].at === "function"), not at the browser's name or version. Checking navigator.userAgent is fragile: browsers lie about their names for compatibility, and versions change every month.

JS Using new features with fallbacks

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

No output.

Transpilers and polyfills

When you must support older browsers, two tools close the gap (Tooling):

  • A transpiler such as Babel, SWC or esbuild rewrites new syntax into older syntax (for example, ?. into a chain of checks).
  • A polyfill adds a missing API by implementing it in plain JavaScript (for example, a Promise.withResolvers written by hand), usually via a library such as core-js.

Projects describe their target browsers in one place โ€” commonly a browserslist query like "> 0.5%, last 2 versions, not dead" or a Baseline target โ€” and the tools use it to decide what to transform. As older browsers fade away, you can raise the target and ship smaller, faster, modern code.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. What is the relationship between ECMAScript and JavaScript?

    ECMA-262 defines ECMAScript. Browsers and Node.js implement it and add their own APIs, and we call the result JavaScript.
  2. 2. Which edition is also known as ES6?

    ES2015 was the sixth edition. It added let/const, arrow functions, classes, modules, promises and much more.
  3. 3. At which TC39 stage is a proposal finished and included in the next edition?

    Stage 4 requires approved spec text, tests, and at least two shipping, compatible implementations.
  4. 4. Why is checking typeof Object.groupBy === \"function\" better than checking the browser version?

    Feature detection asks the real question. User-agent strings are often misleading and change constantly.
  5. 5. An old browser can't parse user?.name. What fixes this for those browsers?

    Syntax can't be polyfilled, because the file fails to parse before any code runs. A transpiler rewrites it into older syntax.

Summary

  • JavaScript was created at Netscape in 1995; the standard it follows is ECMAScript (ECMA-262).
  • ES3 (1999) and ES5 (2009) defined the language for years; ES4 was abandoned.
  • ES2015 (ES6) modernized the language with let/const, arrows, classes, modules, promises and more.
  • Since 2015 a new edition ships every June with the features that reached TC39 Stage 4.
  • Proposals move through stages 0โ€“4; only Stage 4 (and usually 3) is safe to depend on.
  • Check support with compatibility tables, Baseline and feature detection; use transpilers for syntax and polyfills for APIs.

Next: Legacy JavaScript: XMLHttpRequest and jQuery โ€” read and modernize the older code you'll meet in real projects.