ECMAScript
The language specification maintained through the TC39 standards process.
ECMAScript is the official language standard behind JavaScript; it defines the core language, while browsers and runtimes add their own APIs around it.
const scores = [12, 18, 24]; const total = scores.reduce((sum, score) => sum + score, 0); console.log(total); // 54
JavaScript Basics
People often use JavaScript and ECMAScript as if they mean the same thing. They are connected, but not identical. ECMAScript describes the core language: syntax, values, functions, objects, modules and many built-in features.
JavaScript is the practical language experience in a real environment. In a browser that includes the DOM, events, fetch, storage and many web APIs. In Node.js that includes file system APIs, server APIs and packages from npm.
This matters because not every feature belongs to the same layer. Optional chaining is language syntax. document.querySelector is a browser DOM API. fs.readFile is a Node.js API.
The language specification maintained through the TC39 standards process.
The everyday name for implementations of ECMAScript plus host APIs.
The place where code runs: browser, Node.js, Deno, Bun or another runtime.
New language features must be supported by the runtime or transformed by tooling.
Examples
// ECMAScript language feature
const user = { name: "User A", progress: { modules: 4 } };
const modules = user.progress?.modules ?? 0;
// Browser API
document.querySelector("[data-items]").textContent = String(modules);
// This mixes language, browser APIs and server APIs without thinking.
const title = document.querySelector("h1");
const file = fs.readFileSync("data.json");
const value = object?.deep?.property;
Rules that matter
JavaScript becomes much easier when you understand why a pattern exists. The syntax is only the surface; the real skill is choosing the right behavior for the interface.
Ask whether a feature is part of the language, the browser, Node.js or a library.
Modern syntax is powerful, but older browsers or servers may not support it.
ECMAScript evolves through proposals. Stable features are safer than experimental ones.
The DOM is not ECMAScript. It is a browser API JavaScript can use.
const, let, arrow functions, template literals and modules are normal modern JavaScript.
If a project needs a minimum browser or Node version, write that down.
Production thinking
Understanding ECMAScript prevents confusion. You stop asking why a browser feature does not work in Node, or why a new syntax feature fails in an old runtime.
Accessibility APIs are usually browser and HTML concerns. JavaScript can support them, but ECMAScript itself does not make an interface accessible.
Production projects should define supported runtimes. That determines whether you need transpiling, polyfills or runtime upgrades.
Search engines do not care about the name ECMAScript, but they do care when unsupported JavaScript breaks navigation, content or rendering.
Live code lab
The preview runs inside an isolated iframe. The JavaScript is placed inside the HTML editor for now, so every example stays together and remains easy to understand.
Mini assignment
Practice assignment
Try it yourself
Self-check
Do not only read the topic. Change the code, explain what happened and answer the questions in your own words.
Senior audit upgrade
Use these references when browser support, syntax details or proposal status matters.