cloudparts

JavaScript

The language of the web: dynamically typed, garbage collected and single-threaded per event loop, shipped as source and compiled by the engine while it runs.

What it is
Programming languages (run on a virtual machine)
Type
Open source
Made by
Ecma International (TC39 committee)
License
Royalty-free Ecma standard (ECMA-262); each engine has its own licence
Facts checked
24 October 2026

What it is

JavaScript is standardized as ECMAScript in Ecma’s ECMA-262. Since 2015 a new edition comes out every June, named by year; the 17th edition, ECMAScript 2026, was published in June 2026. The TC39 committee moves each proposal through stages 0 to 4, and a feature only reaches stage 4, and the next edition, after two compatible implementations pass the shared Test262 test suite and have shipped. ES2026 adds, among others, Math.sumPrecise, Error.isError and base64 conversion for Uint8Array; Temporal, a replacement for Date, is finished and due in ES2027.

Programs ship as source text, and the engine does the compiling. V8, the engine in Chrome and Node.js, compiles every function to bytecode and starts it in the Ignition interpreter. While it runs, V8 records the types and object shapes it sees; functions that run often are compiled to machine code by Sparkplug, a quick baseline compiler, then by Maglev and TurboFan, which specialise the code for those shapes. When a guess stops holding, the engine deoptimizes back to the interpreter and tries again later. Memory is garbage collected. Types belong to values, and the language converts between them on its own: 42 + "1" is the string "421".

Each agent, such as a web page’s main thread or a Node.js process, runs one thread with a queue of jobs, the event loop. A job runs to completion before the next starts, so a function is never interrupted by other JavaScript, and I/O finishes later as a callback or a resolved promise instead of blocking. Parallel work goes to Web Workers, which are separate agents that exchange messages, or share memory explicitly through SharedArrayBuffer and Atomics. Node.js (2009) took V8 and the event loop to servers, and newer runtimes such as Cloudflare’s workerd followed.

Why teams pick it

  • Runs in every web browser with nothing to install, and the same code style carries to servers, edge runtimes and build tools
  • An open standard with several independent engines and a public process: a feature lands only after two shipping implementations
  • Non-blocking I/O on one thread: no locks to deadlock on, and a function’s state can’t change under it while it runs
  • Engines compile hot code to machine code, so long-running programs get far faster than a plain interpreter

Watch out for

  • Implicit type conversions and old quirks stay forever: changing them would “break the Web”, which is why typeof null is still "object"
  • One thread per agent: a long CPU-bound loop freezes the page or the server’s event loop until it ends, unless the work moves to a worker
  • Speed depends on the engine’s guesses about types and object shapes; code that keeps changing them gets deoptimized and runs slower
  • No static types: mistakes surface at run time unless you add TypeScript or another checker

Alternatives

What all run on a virtual machine have in common →Compare side by side →

How it fits with other technologies

Run to completion: the script finishes before any queued job · js

console.log('1: script starts');

setTimeout(() => console.log('4: timer task'), 0);
Promise.resolve().then(() => console.log('3: promise job'));

console.log('2: script ends');

// 1: script starts
// 2: script ends
// 3: promise job   (microtasks run as soon as the stack is empty)
// 4: timer task    (the next task from the event loop)

console.log(42 + '1'); // "421": the number is converted to a string

See it in a real stack

No architecture uses JavaScript yet. Drop it into the playground and wire it up yourself.Open playground →
Where it came from1995–2026

In spring 1995 Netscape and Sun agreed to put Java into Netscape Navigator 2, and Netscape wanted a simpler “little language” beside it, easy enough for anyone to write a few lines inside an HTML page. Brendan Eich had joined Netscape on 3 April expecting to put Scheme in the browser. Managers at both companies required the new language to “look like Java”, so in about ten days in May 1995 he wrote a prototype called Mocha, with Java-like syntax, Scheme-style first-class functions and objects without classes, inspired by Self’s prototypes.

It shipped as LiveScript in the first Navigator 2.0 beta in September 1995 and as JavaScript 1.0 in March 1996; the name came with Netscape’s Sun partnership, and Sun held the trademark. Netscape took the language to Ecma, whose TC39 committee published ECMA-262 in 1997 under the placeholder name ECMAScript, because Sun would not license “JavaScript”. ES3 followed in 1999, but the large fourth edition stalled and was abandoned in 2008 in favour of a smaller ES5 (2009) and a longer-term plan code-named Harmony.

Harmony became ECMAScript 2015, approved in June 2015 after nearly seven years and 41 committee meetings, with classes, modules and much more. TC39 put the year in its title because it planned smaller yearly editions from then on. Meanwhile Node.js, released in May 2009, wrapped Google’s V8 engine with non-blocking I/O, and JavaScript became a general-purpose language on servers and in tools.

Why it’s built this way

Look like Java, behave like Scheme and Self
Sun and Netscape management required Java-like syntax and ruled out anything like BASIC. Under that surface Eich used first-class functions and a prototype-based object model, which was quicker to build than classes and avoided competing with Java.
Events and callbacks instead of threads
Scripts ran inside the browser as it rendered a page and responded to user actions. Running one job at a time to completion keeps scripts simple, and I/O such as fetch() reports back as an event instead of blocking the page.
Never break the Web
Pages are stored as source and reinterpreted on every visit, often long after their authors stopped maintaining them. A browser that changed the meaning of old code would lose users, so mistakes are fixed by adding opt-ins such as ES5 strict mode, not by removing behaviour.
Small yearly editions with tested implementations
ES4 and ES2015 each took years. After 2015 TC39 moved to a yearly edition, and the stage process requires shipping implementations and Test262 tests before a feature enters the standard.

Timeline

  1. 1995

    Brendan Eich writes the Mocha prototype at Netscape in May; it ships as LiveScript in a Navigator 2.0 beta in September

  2. 1996

    Navigator 2.0 ships JavaScript 1.0 in March

  3. 1997

    Ecma publishes ECMA-262, the first ECMAScript edition

  4. 2008

    TC39 abandons ES4 and starts Harmony

  5. 2009

    ES5 published in December; Node.js released in May

  6. 2015

    ECMAScript 2015 approved in June; yearly editions follow

  7. 2017

    V8 runs all JavaScript through the Ignition interpreter and TurboFan compiler

  8. 2026

    ECMAScript 2026, the 17th edition, published in June

Sources11 · facts checked 24 October 2026

Improve this page on GitHub