Programming languages · Language

JavaScript

The programming language built into every web browser, used to make pages interactive and, through Node.js and similar runtimes, to run servers too.

Web · Free · updated

How it works

JavaScript is the only programming language browsers run directly, apart from WebAssembly. It reacts to clicks and typing, changes the page through the DOM, fetches data from APIs, and powers frameworks such as React, Vue and Svelte. It was created at Netscape in 1995 and is standardised as ECMAScript, which gains a new edition every year.

It is dynamically typed: a variable can hold a number now and text later, and type mistakes surface only when the code runs. Work that waits, such as a network request, runs asynchronously on an event loop with promises and async/await, so one slow task does not freeze the page. Node.js, Deno and Bun run the same language on servers, so one team can use one language across the whole product.

Its package registry, npm, holds millions of packages. The flip side is a sprawling ecosystem where tools and fashions change quickly, and a few historical quirks, such as loose equality with == and automatic type conversion, that catch newcomers out.

JavaScript pros and cons

Pros

  • Runs in every browser with nothing to install
  • One language for front end, back end and mobile (React Native)
  • Vast ecosystem of packages, frameworks and tutorials
  • Fast engines such as V8 make it quick for a dynamic language
  • Easy to start: a text file and a browser are enough

Cons

  • Dynamic typing lets many mistakes through until run time
  • Historical quirks (type coercion, this, ==) catch people out
  • Fast-moving ecosystem with deep dependency trees
  • Slower than compiled languages for heavy number crunching

When to use JavaScript

Pick it when

  • Anything that has to run in a web browser
  • Small scripts, prototypes and pages with a little interactivity
  • A full-stack team that wants one language on front and back end

Skip it when

  • A codebase that will grow large (TypeScript adds safety at little cost)
  • CPU-heavy work such as video encoding or large simulations

JavaScript pricing

Free

Free: built into every browser, and Node.js, Deno and Bun run it on servers at no cost.

Approximate, checked September 2026.What the other tools cost

JavaScript vs the alternatives

More in Programming languages

Web

All 17 Programming languages terms

Crafted in the dark. Shipped to the world.

Tell us what you are building. You get a private project space with a proposal and a line-by-line quote within a day.