langwhy

JavaScript

Web· alive, actively evolving· since 1995 · Brendan Eich · Ecma International (TC39)

The language that runs inside web browsers, and on servers through Node.js.

Draft from 2026-10-30, not yet checked claim by claim against its sources. Help verify it.

Born from

In May 1995 Brendan Eich was building a scripting language for Netscape Navigator, a prototype first called Mocha that was embedded in Navigator 2.0. Netscape decided it needed two languages for two mostly separate audiences, and management required the browser one to look like Java. Eich built its core from Scheme-style first-class functions and Self-style prototypes.

What it trades away

garbage collectedmemory
dynamic typestypes
runs on a virtual machineruns as
asyncconcurrency

Cost: Variables can hold any type at any time, so large codebases rely on tests and tooling to catch mistakes that a compiler would catch in other languages.

Where it fits

SlotFit
browser●●●Used on the client side by 98.9 % of websites.
server●●○Node.js runs it on servers; PayPal moved its consumer web apps to it in 2013.
mobile●●○React Native builds native iOS and Android apps from JavaScript.
cli●●○Node scripts run from the terminal.
systems○○○Engines like V8 are written in C++; JavaScript does not write kernels or drivers.

Why it exists

In May 1995 Brendan Eich was building a scripting language for Netscape Navigator. Netscape decided it needed two languages for two mostly separate audiences, and management required the browser one to look like Java (Eich, “Popularity”, 2008). Eich built the core from Scheme-style first-class functions and Self-style prototypes. His prototype, first called Mocha, was embedded in Netscape Navigator 2.0 (Eich, 2008). The design is dated to May 1995 at Netscape in the history Eich wrote with Allen Wirfs-Brock (HOPL IV).

What it trades away

JavaScript runs wherever a browser runs, and that reach comes with a loose type system. A variable can hold any type at any time, so a large codebase depends on tests and tooling to catch mistakes that a compiler would catch elsewhere. Compatibility was a problem from the start: within a year of release, Netscape’s implementation and Microsoft’s reverse-engineered one disagreed (HOPL IV). Standardization at Ecma began in 1996, and the first edition came out in June 1997 (Ecma International). The standard is now revised every year, so an old engine and a new one can run the same page differently.

Where it won

JavaScript won the browser first. W3Techs puts its share of websites that use it as the client-side language at 98.9 % (W3Techs). It moved to servers through Node.js, and in November 2013 PayPal said its consumer web applications would be built on Node.js, starting with the account overview page (InfoQ). Electron apps use it for desktop software, and the Electron showcase lists Visual Studio Code and Slack (Electron). React Native, which Meta released in 2015, builds native iOS and Android apps from JavaScript (React Native).

Named wins

Evolution

Reacts to: scheme, self, Java

Led to: Dart, TypeScript

Weigh it against: TypeScript, Dart, Python

Timeline

Links

website · docs · PLDB

Sources

  1. https://brendaneich.com/2008/04/popularity/
  2. https://hopl4.sigplan.org/details/hopl-4-papers/10/JavaScript-The-First-20-Years
  3. https://www.ecma-international.org/publications-and-standards/standards/ecma-262/
  4. https://blogs.igalia.com/ltilve/tag/javascript
  5. https://w3techs.com/technologies/details/cp-javascript/
  6. https://www.electronjs.org/apps
  7. https://www.infoq.com/news/2013/11/paypal-java-javascript
  8. https://reactnative.dev/

Unverified draft, 2026-10-30.Edit the facts · edit the story · JSON · Markdown