All languages
JavaScript logo

JavaScript language

Netscape's browser scripting language: dynamically typed, prototype-based, garbage-collected. Standardized as ECMAScript (ECMA-262) and executed everywhere by engines like V8, SpiderMonkey, and JavaScriptCore, in browsers and Node.js.

Overview

JavaScript is the scripting language of the web: engines execute it in every major browser, and hosts like Node.js carry it onto servers. Loosely typed and prototype-based, it is standardized by Ecma TC39 as ECMAScript (ECMA-262).

Code

// literals construct; operators consume.
let year = 1995;
let name = "Mocha";
year + 8;          // 2003
name + " → JavaScript"; // "Mocha → JavaScript"
One tab per tour slot — literals with operators; composition via destructuring; closures and classes as definable units; prototype delegation as the community idiom, which is exactly what class compiles to.

Distinctive traits

  • Prototype-based objects: inheritance by delegation instead of class declarations; objects are open, expandable property bags.
  • First-class functions and closures carry the Scheme lineage; they underpin callbacks, modules, and the async ecosystem.
  • Loose dynamic typing: nothing declared, object references checked at runtime; type mismatches surface late.
  • Garbage-collected automatically; V8's Orinoco collector is generational and moving, tuned to keep pauses short.
  • Host environments inject their object models: browsers reflect the DOM into JS; Node.js hosts server-side code.

Status

Active and standardizing briskly: ECMAScript 2026 (17th edition) published June 2026, with yearly releases and public development on Ecma TC39. Main engines: V8 (Chrome, Node.js), SpiderMonkey (Firefox), and JavaScriptCore (Safari).

History

Prototype (Mocha) built in ten days in May 1995; shipped as LiveScript in the Navigator 2.0 beta, then renamed JavaScript after a Sun trademark agreement in December 1995 — the name from marketing, the semantics from Scheme and Self. ECMA-262 first edition followed in 1997; the stalled ES4 was abandoned in 2008 for Harmony's yearly editions.

Sources & references