JavaScript is the scripting language that runs inside web browsers to make pages interactive. Brendan Eich created the first prototype at Netscape in about ten days in May 1995, and it shipped in Navigator 2.0 that year. It later spread far beyond the browser to servers, mobile apps, and tooling, becoming one of the most widely used languages in software.

Silhouettes of people stand at a railing watching a glowing red system in a dark hall. The crowd suggests the vast number of developers and browsers that adopted JavaScript across the web.
JavaScript spread to a huge audience of browsers and developers, the way a crowd gathers around a single bright source.

What it was

Before JavaScript, a web page was static. The browser downloaded HTML, drew it on screen, and stopped. Any change, such as checking a form or updating a value, meant sending a new request to the server and waiting for a whole new page. The experience felt slow and disconnected.

JavaScript added a small programming language directly inside the browser. Code embedded in a page could react to clicks, edit text on screen, validate a form, and change the layout without contacting the server. The page became a live document rather than a fixed sheet.

Think of a printed poster versus a vending machine. A poster shows the same thing to everyone and never responds. A vending machine reacts to your buttons, lights up, and hands back a result. JavaScript turned web pages from posters into vending machines.

Eich built the first version in days under intense deadline pressure. It was first named Mocha, then LiveScript, and was renamed JavaScript in December 1995. The browser reads the code line by line and runs it, so there is no separate compile step.

Step 1LoadThe browser downloads an HTML page that includes JavaScript.
Step 2ParseThe engine reads the script and builds it into runnable code.
Step 3ReactCode responds to clicks, typing, and timers as the user acts.
Step 4UpdateThe page changes on screen without reloading from the server.

Why it mattered

JavaScript made the web feel alive. Forms could check input before sending it. Menus could open and close. Content could change in place. These small interactions, multiplied across millions of sites, shifted the web from a library of documents toward a platform for applications.

It arrived during the browser boom. Netscape Navigator was the dominant browser, and the web was growing fast. Microsoft soon shipped its own compatible version called JScript in Internet Explorer. Two competing browsers running the same kind of language pushed the technology onto nearly every computer.

To keep the two versions in line, Netscape submitted the language for standardisation. The result was ECMAScript, first published by Ecma International in 1997. That standard meant code could run the same way across different browsers, which made the language safe to build on.

A major leap came in 2005 with a technique called Ajax. It let JavaScript fetch data in the background and update part of a page without a full reload. Web apps like email and maps started to feel as smooth as desktop software, and the modern web application was born.

How it connects to AI today

JavaScript runs the interface of almost every AI product you use in a browser. When you type into a chat assistant, a JavaScript front end captures your message, sends it to a model over the network, and streams the reply onto the screen token by token. The smooth, live feel of these tools comes from JavaScript in the browser.

It also runs on servers. In 2009, Node.js took the browser’s JavaScript engine and let the language run outside the browser. Today many AI backends are written in Node.js. A server reads a user’s prompt, calls a model, and returns generated text, all in the same language that powers the page.

Builders meet JavaScript through official AI software development kits. Companies such as OpenAI and Anthropic publish JavaScript and TypeScript libraries that call their models over HTTP. A developer installs one package, writes a few lines, and connects a web app to a large language model. This is one of the most common ways AI features ship.

The wider ecosystem leans on JavaScript too. Frameworks like React, used to build chat and dashboard interfaces, are written in it. TypeScript, a typed layer on top of JavaScript, is now standard for large AI applications. Models also generate JavaScript well, because so much of it sits in public code repositories used for training.

Still in use today

JavaScript is active and evolving, far from legacy. It runs in every web browser and tops developer usage surveys year after year. The standard, ECMAScript, gets a new edition annually, adding features in a careful, backward-compatible way so old code keeps working.

It persists because it owns a unique position. JavaScript is the only programming language every browser runs natively. No replacement can dislodge it without every browser agreeing to a new standard, so it remains the default language of the web’s front end.

Its reach grew well beyond the browser. Node.js powers servers and command-line tools. Frameworks like React Native and Electron build mobile and desktop apps from JavaScript. The same language now spans the front end, the back end, and the build tools in between.

Newer technologies extend it rather than replace it. TypeScript adds type checking but compiles down to JavaScript. WebAssembly runs other languages in the browser at speed, yet it works alongside JavaScript, not instead of it. The 1995 prototype built in ten days now underpins a vast share of modern software.

Further reading