JavaScript vs ECMAScript
JavaScript vs ECMAScript
Quick Answer
ECMAScript is the official language specification maintained by ECMA International. JavaScript is the name of the language as implemented by browsers and runtimes (Chrome, Firefox, Node.js). Every browser runs JavaScript — but what they actually implement is the ECMAScript standard.
ECMAScript = The Rules
ECMAScript defines the language spec — syntax, data types, objects, built-ins, how the engine must behave.
JavaScript = The Implementation
JavaScript is ECMAScript + browser/runtime APIs (DOM, fetch, setTimeout). It's the name we use in practice.
ECMA = The Standards Body
ECMA International is the organization that maintains and publishes the ECMAScript specification.
TC39 = The Committee
Technical Committee 39 is the group of engineers from browser vendors and companies that proposes and approves new features.
Why Do Two Names Exist?
Why Do Two Names Exist?
1995 — Netscape names it JavaScript
Brendan Eich created the language at Netscape. They named it JavaScript as a marketing move — Java was the hot language of the time, and they wanted to ride its popularity. Sun Microsystems (Java's owner) approved the naming deal.
1996 — Microsoft clones it as JScript
Microsoft reverse-engineered JavaScript and shipped their own version called JScript in Internet Explorer 3. Two incompatible implementations meant web developers had to write different code for each browser.
1996 — Netscape submits to ECMA International
To standardize the language and prevent further fragmentation, Netscape submitted JavaScript to ECMA International — a neutral standards body (like ISO or W3C). This began the standardization process.
1997 — Standard published as ECMAScript
The first official standard was published in June 1997. It could not be called JavaScript because Sun Microsystems (now Oracle) held the trademark on "JavaScript". ECMA International named it ECMAScript after the organization. The spec number is ECMA-262.
Today — Both names persist
Developers say "JavaScript" in everyday conversation. Specs, version numbers, and formal documentation say "ECMAScript" (ES5, ES6, ES2020). Both refer to the same language — JavaScript is just the colloquial name.
Oracle Still Owns the JavaScript Trademark
Oracle (which acquired Sun Microsystems in 2010) still technically owns the JavaScript trademark. This is why the official standard is ECMAScript, and why Mozilla's foundation document says they have a perpetual license to use the name. In 2017, Deno's creator Ryan Dahl filed to cancel the trademark claiming it had been abandoned — but it remains legally complicated.
The Actual Difference
The Actual Difference
✅ Core language syntax(let, const, class, function)✅ Built-in objects(Array, Object, Map, Set, Promise)✅ Standard methods(Array.map, String.includes)✅ Language semantics(how scope, closures work)✅ Module system (import/export)✅ Error handling (try/catch)✅ Iterators & generators✅ Proxy & Reflect❌ DOM (no browser stuff)❌ fetch(), XMLHttpRequest❌ setTimeout, setInterval❌ console.log❌ window, document❌ File system access❌ Network APIs
✅ Everything in ECMAScript(the whole spec)✅ Browser Web APIs(DOM, BOM, CSSOM)✅ fetch() / XMLHttpRequest✅ setTimeout / setInterval✅ console.log✅ window, document, navigator✅ Event system (addEventListener)✅ localStorage / sessionStorage✅ Canvas, WebGL✅ Web Workers── In Node.js only ──✅ fs (file system)✅ http / https✅ process, Buffer✅ require() / CommonJS
✅ Core language syntax(let, const, class, function)✅ Built-in objects(Array, Object, Map, Set, Promise)✅ Standard methods(Array.map, String.includes)✅ Language semantics(how scope, closures work)✅ Module system (import/export)✅ Error handling (try/catch)✅ Iterators & generators✅ Proxy & Reflect❌ DOM (no browser stuff)❌ fetch(), XMLHttpRequest❌ setTimeout, setInterval❌ console.log❌ window, document❌ File system access❌ Network APIs
✅ Everything in ECMAScript(the whole spec)✅ Browser Web APIs(DOM, BOM, CSSOM)✅ fetch() / XMLHttpRequest✅ setTimeout / setInterval✅ console.log✅ window, document, navigator✅ Event system (addEventListener)✅ localStorage / sessionStorage✅ Canvas, WebGL✅ Web Workers── In Node.js only ──✅ fs (file system)✅ http / https✅ process, Buffer✅ require() / CommonJS
Key Insight
console.log() is not in the ECMAScript spec. It's provided by the browser (or Node.js) runtime as a Web API / runtime API. The same goes for setTimeout, fetch, document, and window. ECMAScript defines the core language; the runtime adds the environment-specific APIs on top.
1// ✅ These are ECMAScript — work everywhere (browser, Node, Deno, Bun)2const name = 'Alice'; // let/const — ES63const greet = (n) => `Hello, ${n}!`; // arrow fn + template literal — ES64const nums = [1, 2, 3].map(x => x * 2); // Array.map — ES55const { a, b } = { a: 1, b: 2 }; // destructuring — ES66const p = new Promise((res) => res(42)); // Promise — ES678// ✅ These are Browser/Runtime APIs — NOT in ECMAScript spec9console.log(greet(name)); // console — runtime API (but universally available)10// setTimeout(() => {}, 1000); // timer API11// fetch('https://api.example.com'); // Fetch API12// document.querySelector('h1'); // DOM API13// localStorage.setItem('key', 'v'); // Web Storage API1415console.log(nums); // [2, 4, 6]16console.log(a, b); // 1 2
Understanding ECMAScript Version Numbers
Understanding ECMAScript Version Numbers
| Edition | Year | Also Known As | Notable Features |
|---|---|---|---|
| ES1 | 1997 | ECMAScript 1 | First published standard |
| ES2 | 1998 | ECMAScript 2 | Minor editorial changes |
| ES3 | 1999 | ECMAScript 3 | Regex, try/catch, do-while |
| ES4 | — | Abandoned | Never released — too controversial |
| ES5 | 2009 | ECMAScript 5 | strict mode, JSON, Array.forEach/map/filter |
| ES5.1 | 2011 | ECMAScript 5.1 | ISO alignment corrections |
| ES6 | 2015 | ES2015 / ECMAScript 2015 | let/const, classes, arrow fns, modules, Promise, destructuring, template literals |
| ES7 | 2016 | ES2016 | Array.includes(), ** operator |
| ES8 | 2017 | ES2017 | async/await, Object.entries/values, String padding |
| ES9 | 2018 | ES2018 | Rest/spread for objects, async iteration, Promise.finally |
| ES10 | 2019 | ES2019 | Array.flat/flatMap, Object.fromEntries, optional catch |
| ES11 | 2020 | ES2020 | BigInt, ??, ?., Promise.allSettled, globalThis |
| ES12 | 2021 | ES2021 | String.replaceAll, Promise.any, logical assignment |
| ES13 | 2022 | ES2022 | Top-level await, class fields, Array.at, Object.hasOwn |
| ES14 | 2023 | ES2023 | Array.findLast, toSorted, toReversed, toSpliced |
| ES15 | 2024 | ES2024 | Promise.withResolvers, Object.groupBy, RegExp /v flag |
Who Controls JavaScript? — TC39
Who Controls JavaScript? — TC39
Who is in TC39?
Google, Mozilla, Apple, Microsoft, Meta, Salesforce, Bloomberg, Igalia, and many more. Browser vendors have the most influence since they implement the spec.
What does TC39 do?
TC39 meets every 2 months to review proposals, advance them through stages, and ultimately decide what goes into ECMAScript.
Open Process
TC39 proposals are all public on GitHub (github.com/tc39/proposals). Anyone can open issues, comment, and participate in discussions.
Annual Releases
Since 2015, TC39 cuts a new ECMAScript release every June. Any Stage 4 proposals by the cutoff date make it into that year's release.
How a feature gets into JavaScript
- Someone writes a Stage 0 proposal on GitHub
- A TC39 member champions it → Stage 1 (problem defined)
- Spec text written → Stage 2 (formal draft)
- Browser vendors review & implement it → Stage 3 (candidate)
- Two independent browser implementations ship → Stage 4 (done!)
- Gets included in the next June ECMAScript release
The whole process can take months to years depending on complexity.
JavaScript Engines — Who Implements ECMAScript
JavaScript Engines — Who Implements ECMAScript
| Engine | Made By | Used In | Notes |
|---|---|---|---|
| V8 | Chrome, Node.js, Deno, Bun, Edge | Fastest engine; uses JIT compilation; open source | |
| SpiderMonkey | Mozilla | Firefox | First ever JS engine (Netscape, 1995); open source |
| JavaScriptCore (JSC) | Apple | Safari, WebKit | Also called Nitro; used on iOS for all browsers |
| Hermes | Meta | React Native | Optimized for mobile; AOT compilation |
| QuickJS | Fabrice Bellard | Embedded systems | Tiny, complete ES2023 implementation in C |
| GraalJS | Oracle | GraalVM | JS on the JVM; interop with Java |
All browsers on iOS use JavaScriptCore
Apple's App Store rules require all browsers on iOS to use WebKit (Apple's rendering engine) under the hood. This means Chrome, Firefox, and every other browser on iPhone uses JavaScriptCore — not V8 or SpiderMonkey. This is why JS performance on iOS sometimes differs from desktop browsers.
Using New ECMAScript Features Today
Using New ECMAScript Features Today
// Top-level await (ES2022)const data = await fetch('/api/users').then(r => r.json());// Class fields (ES2022)class Counter {#count = 0; // private fieldincrement() {this.#count++;}get value() {return this.#count;}}// Optional chaining (ES2020)const city = user?.address?.city ?? 'Unknown';// Object.groupBy (ES2024)const grouped = Object.groupBy(items, ({ type }) => type);
// Top-level await → wrapped in async(async function() {var data = await fetch('/api/users').then(function(r) {return r.json();});})();// Class fields → constructor assignmentvar Counter = function Counter() {this._count = 0; // private emulated};Counter.prototype.increment = function() {this._count++;};// Optional chaining → manual checksvar city = user && user.address && user.address.city? user.address.city : 'Unknown';// Object.groupBy → manual reducevar grouped = items.reduce(function(acc, item) {(acc[item.type] = acc[item.type] || []).push(item);return acc;}, {});
Check browser support — caniuse.com & MDN
Before using a new ECMAScript feature, check caniuse.com or MDN's browser compatibility table. Most ES2015–ES2020 features are supported in all modern browsers without transpilation.
Use Babel for older browser support
Babel is a transpiler that converts modern JavaScript to ES5. Configure a target list (e.g. 'last 2 versions') and Babel automatically transforms only what's needed. Used by default in Create React App and most build tools.
TypeScript handles it natively
TypeScript compiles down to your target ECMAScript version. Set "target": "ES5" or "target": "ES2020" in tsconfig.json and tsc transforms the output accordingly.
Modern apps can target ES2020+
If you're building for modern browsers (Chrome 80+, Firefox 75+, Safari 13+) you can use ES2020 syntax without any transpilation. All evergreen browsers support async/await, optional chaining, and nullish coalescing natively.
Naming Cheat Sheet
Naming Cheat Sheet
| Term | What It Means | Example Usage |
|---|---|---|
| JavaScript | The language as implemented + runtime APIs | "I write JavaScript code." |
| ECMAScript / ES | The official language standard (ECMA-262) | "ES6 introduced arrow functions." |
| ES5 | ECMAScript 5th edition (2009) | "Supported in all browsers including IE9+" |
| ES6 / ES2015 | ECMAScript 6th edition — the same version | "We upgraded to ES6" = "We upgraded to ES2015" |
| ES.Next | The next upcoming ECMAScript release | "This feature is ES.Next — not final yet" |
| TC39 | The committee that evolves ECMAScript | "TC39 approved the proposal at Stage 4" |
| ECMA-262 | The document number of the ECMAScript spec | "Per ECMA-262 section 12.1..." |
| V8 / SpiderMonkey | A JavaScript engine (implements ECMAScript) | "Chrome uses V8 to run JavaScript" |
| Babel | A transpiler from modern JS to older ES | "Babel converts ES2022 to ES5" |
| TypeScript | A superset of JavaScript with static types | "TypeScript compiles to plain JavaScript" |
Common Misconceptions
Common Misconceptions
- 1**"JavaScript and ECMAScript are completely different languages"** — False. ECMAScript IS JavaScript. JavaScript = ECMAScript + runtime APIs. They describe the same core language.
- 2**"ES6 is newer than ES2015"** — False. ES6 and ES2015 are the exact same release. After ES6, the naming switched to years.
- 3**"The latest ECMAScript has features my browser doesn't support yet"** — Often false. All major browsers are evergreen and update frequently. Most ES2020 features are widely supported.
- 4**"TypeScript replaces ECMAScript"** — False. TypeScript is a superset that adds types. It always compiles down to standard ECMAScript JavaScript.
- 5**"Node.js has its own version of JavaScript"** — Not exactly. Node.js uses the V8 engine (same as Chrome) and implements ECMAScript. It adds Node-specific APIs (fs, http, process) on top — just like browsers add DOM/Web APIs.
- 6**"You need Babel to use modern JavaScript"** — Not always. If you target modern browsers (2022+), you can use ES2020+ features natively without any transpilation step.
- 7**"console.log is part of JavaScript/ECMAScript"** — Technically false. `console` is a Web API provided by the runtime, not defined in the ECMAScript spec. However, it's available in every modern runtime.
Test Your Knowledge
Test Your Knowledge
Why is the language standard called ECMAScript instead of JavaScript?
Which of these is defined in the ECMAScript specification?
ES6 and ES2015 refer to:
What is TC39?
Which JavaScript engine does Safari (and all browsers on iOS) use?
Summary
Summary
Key Points to Remember
• ECMAScript is the official specification. JavaScript is the name we use every day. • The name difference is purely historical — a trademark issue from 1995–1997. • ECMAScript defines the core language. JavaScript adds browser/runtime APIs on top. • TC39 is the committee that evolves ECMAScript through a public 5-stage proposal process. • ES6 and ES2015 are the same version. After ES6, naming switched to years. • Modern browsers support ES2020+ natively — you often don't need Babel anymore.
Variables & Data Types
Start writing JavaScript — learn let, const, and all 8 primitive types.
How JavaScript Runs
Understand the JavaScript engine, the event loop, and how code executes.
ES6+ Features
Explore the modern JavaScript features from ES2015 onwards.
TypeScript Basics
Add static types to JavaScript with TypeScript — the superset of ECMAScript.
Try it in the Javascript Compiler
Run and experiment with Javascript code right in your browser — no setup needed.