History of JavaScript
JavaScript began as a small scripting language for adding interactivity to web pages and grew into one of the most widely used programming languages, running in every browser, on servers through Node.js, and inside mobile and desktop apps. Knowing how it evolved explains many of its quirks and why its name has so little to do with Java.
Born inside a browser
In the early web, pages were static documents. Netscape, which made the most popular browser of the time, wanted a lightweight language that designers and part-time programmers could embed directly in HTML. Brendan Eich wrote the first version very quickly, famously in around ten days. It was first called Mocha, then LiveScript, and finally renamed JavaScript.
The final name was largely a marketing decision. Java was attracting a lot of attention, and Netscape had a partnership with Sun Microsystems, its creator. Apart from some C-style syntax such as curly braces, the two languages are very different: Java is compiled and class-based, while JavaScript was interpreted, dynamically typed and built around functions and prototypes.
Standardisation as ECMAScript
Microsoft soon shipped its own compatible version, called JScript, in Internet Explorer. Two diverging implementations threatened to split the web, so Netscape handed the language to the standards body Ecma International. The official specification is called ECMAScript, and JavaScript is the most common implementation of it. When you see names like ES5 or ES2015, they refer to editions of that standard.
Key milestones
| Milestone | What changed |
|---|---|
| ES3 | Regular expressions, try...catch; the long-lived baseline of the early web |
| ES4 (abandoned) | An ambitious redesign that was dropped after disagreement |
| Ajax and libraries | Background requests made rich web apps possible; jQuery smoothed over browser differences |
| V8 and Node.js | Google's fast engine made JavaScript quick, and Node.js brought it to servers |
| ES5 | Strict mode, JSON support, array methods like forEach and map |
| ES2015 (ES6) | let, const, arrow functions, classes, modules, promises, template literals |
| Yearly editions | Smaller regular updates such as async/await, optional chaining and ?? |
Seeing history in today's code
Many features you use daily arrived in ES2015. Here is the same task written in the older and the modern style:
// Older style (ES5)
var prices = [120, 80, 45];
var withTax = prices.map(function (p) {
return p * 1.18;
});
var message = "Total items: " + prices.length;
// Modern style (ES2015 and later)
const pricesNow = [120, 80, 45];
const withTaxNow = pricesNow.map((p) => p * 1.18);
const messageNow = `Total items: ${pricesNow.length}`;
const firstDiscount = pricesNow.find((p) => p < 50) ?? "none";
Quirks that come from its fast start
Because the language was designed quickly and then had to stay backwards compatible, a few early decisions could never be removed. typeof null returns "object", a bug from the first implementation. Loose equality with == performs confusing type conversions. Variables declared with var are function-scoped and hoisted. Rather than break old websites, the language added better alternatives: ===, let and const, and strict mode.
A misconception worth clearing up: JavaScript today is not "just interpreted". Modern engines compile hot code to machine code on the fly using just-in-time compilation, which is why it is fast enough for games, editors and servers.
How the language evolves now
New features go through a committee called TC39 in numbered stages, from an initial idea to a finished proposal that browsers have already implemented. A new edition of the standard is released regularly with whatever proposals are ready, so the language now changes in small, steady steps.
Takeaway: JavaScript started as a quick browser scripting language, was standardised as ECMAScript, took a big leap with ES2015, and keeps its early quirks only for backwards compatibility while adding safer modern alternatives.
Ready to master real-world web development?
Learn HTML, CSS3, Bootstrap and JavaScript hands-on with mentor-led sessions.