// 1995 — 2026 · Brendan Eich · ECMA TC39

JavaScript:TheLanguageOfTheWeb

Brendan Eich prototyped it in 10 days at Netscape in 1995 — the name was a marketing piggyback on Java. Thirty years later it runs in every web page you open, on most backend servers, inside AI tooling, and on Mars rover dashboards. The most criticized — and least replaceable — language alive.

#1most-used language, 13y
StackOverflow Survey
2.5M+npm packages
largest open registry alive
3B+devices run it natively
every browser speaks it
10ddays to prototype
1995 · Brendan Eich
() => {}asyncawaitPromise?.??...spreadthisprototype== ===npm ievent loopclosure
scroll
01

What is JavaScript

JavaScript is a dynamic, interpreted, single-threaded scripting language built for the browser. In a browser it drives the DOM; on a server it speaks HTTP; in AI tooling it orchestrates LLM calls — one language, thirty years, every layer.

Dynamic dynamic

Variables don't carry types — values do. Types resolve at runtime, which is flexible — but errors also only surface at runtime.

Interpreted interpreted

No compile step. Source goes into the engine, gets parsed, JITed, and run on the fly. "Write and run" is the language's biggest dev-experience win.

Single-threaded event-loop

One main thread, period. All "concurrency" is the event loop plus async task queuing. Workers exist, but by default you have exactly one thread.

Prototypal prototype

Objects inherit from other objects, not classes. ES6's class is sugar over the prototype chain. The model is eerily simple — and unreasonably powerful.

old.js · 1996ES3
var user = { name: "Brendan", age: 35 };

function greet(u) {
  var self = this;  // this rebound, again
  return "Hi, " + u.name;
}

setTimeout(function() {
  callback(function() {
    // callback hell...
  });
});
modern.js · 2026ES2026
const user = { name: "Brendan", age: 35 };

const greet = (u) => `Hi, ${u.name}`;

async function load() {
  const res = await fetch("/api/me");
  const { name } = await res.json();
  return name ?? "anon";
}

// same language, different planet
02

History : Timeline

From a 10-day prototype at Netscape, through the browser wars and a decade of stillness, to the ES6 generational leap and today's multi-runtime landscape — a language that has evolved by addition, never subtraction, for 30 years.

  1. 1995·05

    10 days of "Mocha"

    Brendan Eich prototyped it in 10 days at Netscape under the codename Mocha, originally meant to embed Java applets in the browser. Marketing pushed it as a standalone language. The prototype was so rushed that the prototype chain, this rules, and coercion quirks all date to those 10 days.

  2. 1995·12

    Renamed to JavaScript

    December 4th: Netscape and Sun co-announced the rename — pure marketing, riding Java's hype. Thirty years of developers have complained ever since: "Java is to JavaScript as ham is to hamster."

  3. 1996·08

    JScript / browser wars

    Microsoft shipped a reverse-engineered clone in IE 3.0 — JScript. The two implementations diverged wildly; web devs had to write a different code path for each browser. The phrase cross-browser compatibility was born here.

  4. 1997·06

    ECMA-262 1st edition

    To stop the browser wars, the spec moved to ECMA — standard name ECMAScript. "JavaScript" was a Netscape trademark, so the spec uses a different name. This still confuses newcomers thirty years later.

  5. 1999·12

    ES3 — a decade of stillness

    Regex, try/catch, stricter equality. After ES3 the language sat for ten years — ES4's ambitions were vetoed, and the spec committee deadlocked. The language froze; meanwhile, browser engines quietly grew up underneath.

  6. 2005·02

    "Ajax" coined

    Jesse James Garrett named the trick that powered Gmail and Google Maps — pages that update without reloading: Ajax. The frontend suddenly stopped being static rendering and started carrying full apps. JS finally got taken seriously.

  7. 2006·08

    jQuery takes over

    John Resig shipped jQuery, wrapping the maze of IE6/7/8/9 DOM APIs behind $(...). It ruled for nearly a decade — at peak it sat on 80% of all websites. "Reach for jQuery first" was every frontend dev's reflex.

  8. 2008·09

    V8 + Chrome — the JIT revolution

    Google launched V8 and Chrome. JavaScript moved from interpreter to JIT compiler — order-of-magnitude faster. From that moment "JS is slow" stopped being a default assumption and became a tractable engineering problem.

  9. 2009·05

    Node.js — JS on the server

    Ryan Dahl wrapped V8 with an event loop and non-blocking IO — Node.js. "JavaScript everywhere" stopped being a slogan and became a roadmap. The npm package manager arrived a year later.

  10. 2009·12

    ES5 thaws the ice

    strict mode, JSON.parse, map / filter / reduce on arrays, Object.keys. The decade-long deadlock broke; TC39 started moving again. This is modern JS's first foundation slab.

  11. 2015·06

    ES6 / ES2015 — the biggest leap

    let / const, arrow functions, class, import / export, Promise, generators, destructuring, template literals, the spread operator — all in one shot. The single biggest upgrade in the language's history. "Modern JS" and "ancient JS" parted ways here.

  12. 2017·06

    async / await

    ES2017 ships async / await. "Callback hell" is formally retired. Async code finally reads like sync code; for the first time, a beginner can write a network request without a tutorial detour.

  13. 2020

    ES2020 — quality-of-life upgrades

    Optional chaining ?., nullish coalescing ??, dynamic import(), BigInt, Promise.allSettled, globalThis. Each small, but stacked together: another step-change in everyday ergonomics.

  14. 2024

    TC39's yearly cadence

    One release a year, like clockwork. Recent landings: iterator helpers, Set methods (union / intersection / difference), Promise.withResolvers. Records & Tuples and Pattern Matching are still in proposal land. Language evolution is now "ship small, ship often."

  15. 2026

    Still the world's #1 language

    StackOverflow Survey: JavaScript, 13 years running. npm hosts 2.5M+ packages. Native to every browser; Node / Bun / Deno all run it; AI tools (Claude Code / Cursor / v0) emit it by default. The "ESM vs CJS" wound has mostly healed, though a few packages still nurse it.

03

Language Essentials : JsAlphabet

Thirty years of additive evolution leave a language with more features than anyone remembers. The eight below cover 90% of day-to-day code — internalize them; everything else is an MDN search away.

A

Prototypes + this

Objects point at another object as "prototype"; lookup walks the chain. this isn't a field on the object — it's injected by the call site.

const animal = { speak() { console.log(this.name); } };
const cat = Object.create(animal);
cat.name = "Mochi";
cat.speak();          // Mochi

const f = cat.speak;
f();                  // undefined  ← this lost
B

First-class fns + closures

Functions are values — pass them, return them, store them. They capture their outer scope at creation time and carry it around. That's a closure.

function counter() {
  let n = 0;
  return () => ++n;
}

const tick = counter();
tick(); tick(); tick();   // 3
// n 仍活着,被闭包抓住了 / n still alive
C

Dynamic types + coercion

Variables don't have types — values do. + coerces to string the moment a string shows up. JavaScript's most flexible — and most infamous — corner.

1 + "2"           // "12"  ← string
"5" - 1           // 4     ← number
[] + []           // ""
[] + {}           // "[object Object]"
Number("")        // 0

// 用 === 不用 ==  / use ===, never ==
D

The event loop

JavaScript is single-threaded, but has a scheduler: macrotasks, microtasks, render. Once you grok it, async behavior stops being magic.

console.log("A");
setTimeout(() => console.log("B"), 0);
Promise.resolve().then(() => console.log("C"));
console.log("D");

// A D C B
// 同步 → 微任务 → 宏任务
E

Promise + async / await

A value-that-will-arrive, modeled as an object. async functions auto-wrap into Promises; await lets you write async code that reads like sync.

async function load() {
  const res = await fetch("/api/users");
  if (!res.ok) throw new Error(res.statusText);
  return res.json();
}

const users = await load();
F

Destructuring + spread

Pull objects and arrays apart by shape. Combined with ... spread, immutable updates become one-liners.

const { name, age = 18 } = user;
const [first, ...rest] = items;

const next = { ...user, age: user.age + 1 };
const all = [...a, ...b, 42];
G

ESM modules

import / export, statically analyzable. Every file is its own scope — no more global pollution. Native in Node 22+, Bun, Deno, and every modern browser.

// math.js
export function add(a, b) { return a + b; }
export const PI = 3.14159;

// app.js
import { add, PI } from "./math.js";
H

Optional chaining + nullish

ES2020's ?. and ??. The defensive "a && a.b && a.b.c" pattern finally went extinct.

const city = user?.address?.city;
// undefined if any link is null

const page = query.page ?? 1;
// only fall back on null / undefined
// (0 and "" stay)

All adds, no subtractions

In 30 years, TC39 has almost never removed a feature. var, ==, prototypes, the this quirks — all permanent residents. Learning JS isn't just learning best practice; it's knowing which paths to avoid.

"JavaScript wasn't designed — it evolved."

04

Why JS Ate the World : WhyJS

No language wins because it was beautifully designed. JS won because it was in the right place at the right time — the browser. The next thirty years were compound interest.

Every browser speaks it

Chrome / Safari / Firefox / Edge — your code runs with zero install. No other language has this foundation. 3 billion devices are simultaneously its runtime.

// open devtools, anywhere
alert("Hello");

Never break the web

That line of code from 1996 still runs in 2026. JavaScript is backward-compatible forever, by design. The greatest promise the language ever made — and the reason it carries every old design wart with it.

// 1996
var x = 1;
// 2026 — still runs

Async in the genes

Single-threaded plus event loop — designed for the browser, generalized to servers, IoT, edge functions. Node, Bun, Deno, Cloudflare Workers — all incarnations of the same model.

setTimeout(tick, 0);
fetch(url).then(render);
// the loop schedules everything

npm — the largest registry alive

2.5M+ packages, 200B+ monthly downloads. One npm install pulls in a full SDK. The ecosystem's reach is unmatched by any other language.

npm i react vite zod
// three industries arrive in 5s

TC39 — slow but durable

Every proposal goes through 4 stages. Slow — but everything that lands stays permanently. The community complains about pace, but nobody wants to return to the ES4 era of "throw everything in."

// stage 0 → 1 → 2 → 3 → 4
// once at 4, it's in the language
// for the next 30 years

"Just run it"

No compile step. Write, run, see. The language is built around the prototype → validate → iterate loop. Not the most rigorous, but the fastest path from idea to demo.

// 0 boilerplate
document.title = "hi";
// → done

AI tooling's native tongue

Claude Code, Cursor, v0, Bolt — AI code generators speak JS/TS most fluently. JS dominates the training corpus, and models are most accurate on it.

// "build me a todo list"
// → 80 lines of React + JS
// in seconds, mostly correct

Reaches every platform

Desktop (Electron / Tauri), mobile (React Native / Capacitor), terminal (Ink), embedded (Espruino), an entire phone OS (KaiOS), font editors (FontForge), even spacecraft dashboards. Wherever JS can run, someone is writing JS.

// same language, all platforms
// VS Code · WhatsApp Desktop
// NASA Mars rover dashboard

From day-1 to decade-10

Lesson one: alert("Hi"). A decade later: a 1.5M-line VS Code in the same language. Low floor, very high ceiling — the core reason it has lasted.

// day 1
alert("Hi");

// year 10
// VS Code, Figma, Linear...
05

Who's Using : ProductionUsers

From Netflix streaming and PayPal payments to VS Code, Figma, and Discord — almost every app you touch daily is running JS. The 12 below barely scrape the surface.

06

JavaScript in the : AI Era

AI tooling speaks JS overwhelmingly — not because it's elegant, but because it dominates the public-code corpus. LLMs have seen more JS than any other language, and their first-shot accuracy reflects it. A moat built on data scale.

"

JavaScript doesn't have to be the best language. It just has to be there — in every browser, on every syllabus, in every company. When an AI model picks a default output language, it picks the one it has seen most — and that's JS. The first law of language ecology: scale is destiny.

Developer community consensus2025 · across multiple LLM coding benchmarks
#1
LLMs' most fluent output

2025 benchmarks across Claude / GPT / Gemini, identical prompts: JS / TS produced the highest first-shot success rate. The reason is direct — the public training corpus is dominated by JavaScript.

2.5M
npm package count

The largest open-source registry alive. When AI reaches for "a library to do X," npm is the first place it looks. The ecosystem's pulse: 200B+ downloads / month.

100%
of mainstream AI IDEs use JS/TS

Cursor / Continue / v0 / Bolt / Lovable / Claude Code — every mainstream AI coding tool is written in JS or TS. Electron + React + Node is now the de-facto AI-tool stack.

SPOTLIGHT

v0 + AI SDK Vercel's AI output stack

You describe "I want a login page" in plain English; v0 outputs a complete Next.js + React + Tailwind page — powered by Vercel AI SDK calling an LLM under the hood. Every step is JS: the model call, the component synthesis, even the runtime it deploys to.

  • Vercel AI SDK20M+ monthly downloads, provider-agnostic
  • Next.js / Reactthe framework v0 emits
  • Edge RuntimeJS on millisecond-cold-start workers

One line: JS is the universal currency of AI coding, from input to output.

// AI SDK · one call, structured output
import { generateObject } from "ai";
import { anthropic } from "@ai-sdk/anthropic";
import { z } from "zod";

const { object } = await generateObject({
  model: anthropic("claude-opus-4-7"),
  schema: z.object({
    title: z.string(),
    items: z.array(z.string())
  }),
  prompt: "a todo list, 3 items"
});

AI tool chain · almost entirely JS / TS

Claude Code
Anthropic terminal agent · TS / Bun
Cursor
AI IDE · Electron / TS
GitHub Copilot
VS Code editor extension · TS
v0
Vercel UI generator · emits React/JS
Bolt.new
In-browser AI IDE · WebContainer
Lovable
Natural-language to React apps
Vercel AI SDK
AI app framework · TS-only
LangChain.js
LangChain, JS implementation
Mastra
Agent / workflow · TS
Replit Agent
Cloud AI coding · runs on Node
Continue
Open-source VS Code AI helper
Aider
Terminal AI pair-programmer
Zod
Schema validation · half of AI uses it
@anthropic-ai/sdk
Official Anthropic JS SDK
openai (npm)
Official OpenAI JS SDK
MCP TS SDK
Model Context Protocol · TS
FEEDBACK LOOP

The feedback loop

Big JS share in the corpus → LLM is more accurate at JS → people use AI to ship more JS → that JS lands in the next training set → loop.

The loop has been running for 3-4 years now, and the result is that JS's moat keeps widening in the AI era. Other languages aren't broken — but the model is less confident in them, the user reviews more, and the cost compounds. Market forces drift toward JS.

The flip side: the day AI tools stop being written in JS, it'll mean a new language has shown up that even the models prefer. Don't hold your breath.

// public-code corpus estimate · 2025
const corpus = {
  javascript: "~24%",
  python:     "~17%",
  typescript: "~10%",
  java:       " ~9%",
  other:      "~40%"
};

// JS + TS ≈ 34% · more than any single rival
// model fluency in JS = how much JS it has seen

Summary, one line: JavaScript isn't the AI era's best language — it's the most irreplaceable one. Browsers depend on it, the ecosystem is anchored by it, training data is dominated by it. Thirty years of compound interest hardened into a moat.

07

vs TypeScript : JS vs TS

JS and TS aren't two languages — they're two postures of the same language. JS's flexibility built the web; TS's discipline carries the enterprise. This site's /code/ts page is the other face of the same coin.

JavaScriptTypeScript
Compile stepNone — just run ittsc / esbuild / Node 22+ strip
Type checkingRuntime onlyCompile-time / live in IDE
StartupInstantCompile cost
Flexibility100% — anything goesConstrained — forces you to think
RefactoringGrep + prayerType-driven, one-click
PrototypingUnbeatableA touch slower; types ask for completion
Maintainability at scaleSnowballing bugsType signatures = contracts
3rd-party libsNative, zero overheadNeed @types/* or built-in d.ts
LLM codingBiggest corpus, top accuracyTypes as guardrails, errors catch faster
AI tool stacks useThe runtime layerThe application layer
Learning curveLesson oneJS plus one more layer
PhilosophyGet it runningThink it through first
08

Outlook : TheRoadAhead

Language evolution is now "ship small, ship often" — TC39 yearly; runtimes are blooming — Bun / Deno / Edge; the AI-tool coupling deepens. Thirty years in, the moat keeps widening.

HOT · POST-NODE

The "post-Node" runtime era

The server side has been Node's territory for over a decade — but the wind shifted in 2024: Bun starts 4× faster than Node, eats TS / JSX natively, ships SQLite; Deno tightens the security model and ships a fatter standard library; Cloudflare Workers / Vercel Edge push JS into millisecond-cold-start edge territory.

The endgame isn't replacement — it's one language, four runtimes, each with its niche: Node for ecosystem, Bun for performance, Deno for safety, edge runtimes for deployment.

Node 22 cold start~120ms
Bun 1.x cold start~30ms
TC39

Records & Tuples

Immutable #{ a: 1 } and #[1, 2], compared by value. Once it lands, the old "Map with object keys" pain disappears and functional-style code finally reads naturally.

Status: Stage 2, deadlocked for years on === semantics.

TC39

Type annotations as comments

TC39 Stage 1 proposal: treat TS-style annotations as comments — JS engines simply ignore them. If it lands, the separate tsc step disappears and "JS that runs TS" becomes literal.

PERF

WASM, JS's escape hatch

Compute-heavy work (image processing, compression, SIMD, 3D) goes to WASM; UI and orchestration stay in JS. Figma's design algorithms, AutoCAD Web, Photoshop Web, Google Earth — all real-world WASM + JS in production.

AI

The LLM's go-to output

2025 benchmarks: across mainstream LLMs and identical prompts, JS / TS produce the highest first-shot success rate — simply because the training corpus is dominated by them. The more AI spreads, the wider JS's moat: language and model are in a positive feedback loop.

DATA

13 years as #1 most used

StackOverflow Survey: JavaScript has been the most-used language for 13 straight years. GitHub contributor counts were only overtaken by TypeScript in 2025 — and TS is just another spelling of JS.