JavaScript Was Written in About Ten Days

JavaScript Was Written in About Ten Days

Brendan Eich built JavaScript at Netscape in about ten days in 1995, renamed from Mocha to LiveScript to JavaScript to ride Java's fame. Why the two are unrelated.

The language now called JavaScript was created by Brendan Eich at Netscape in about ten days in May 1995. It was first named Mocha, then LiveScript, and finally renamed JavaScript in a marketing deal meant to ride the popularity of Java — even though the two languages are largely unrelated. Its real significance was architectural: a scripting language running inside the browser meant a page could respond to a user without a slow round-trip to the server, which is the seed of the interactive web. The language was handed to a standards body and became ECMAScript in 1997. This piece covers the haste, the naming, and why an in-browser language changed what the web could do.

Why the browser needed a language

In the early-to-mid 1990s, a web page was essentially a static document. The browser fetched some HTML from a server, displayed it, and waited. If you filled in a form or wanted the page to react to something you did, the usual path was to send your input back to the server, have the server compute a response, and receive a whole new page in return. Over the dial-up connections of the time, that round-trip was slow and clumsy for anything that should feel immediate.

The missing piece was a way to run small programs inside the browser itself, on the user's own machine, so a page could react on the spot — validate a form field, respond to a click, change something on screen — without waiting on the network. That is the gap the new language was meant to fill. It was not about heavy computation; it was about making pages responsive on the client side. Naming why the browser needed its own language matters, because the language's whole reason for existing was that round-trips were too slow for an interactive medium.

1995: ten days at Netscape

The language was built under intense time pressure. Netscape, maker of the Navigator browser, wanted a scripting language in its next release, and the schedule was brutal. Brendan Eich, hired into the company, produced a working prototype in around ten days in May 1995. Ten days is not long to design a programming language that would eventually be implemented in every major web browser.

That origin is not a trivia point; it is part of why the language is the way it is. Decisions made quickly, to hit a shipping deadline for a browser, became permanent once the language spread and backward compatibility had to be preserved. Some of JavaScript's well-known quirks trace directly to choices that had to be locked in fast and could never be cleanly undone. The honest version of the story is not that JavaScript was carefully and deliberately designed over years; it is that a capable engineer assembled something workable in a sprint, and the web grew up around it. The haste is the point, not a footnote.

Mocha, LiveScript, JavaScript

The name took a winding path. The language was first known internally as Mocha, then called LiveScript when it first appeared in the September 1995 beta of Netscape Navigator 2.0. Its final and lasting name arrived through marketing rather than engineering. In a December 1995 announcement, Netscape and Sun Microsystems presented the language as "JavaScript," deliberately tying it to Java, Sun's language, which was being widely hailed at the time.

The renaming has caused confusion ever since, because the two are largely unrelated. Java and JavaScript share some surface syntax and the first four letters of a name, but they are different languages with different designs, different histories, and different purposes. JavaScript was not a lightweight version of Java, and Java was not its parent. The shared name was a decision about positioning — attaching a new, unproven scripting language to a hot brand — not a statement about technical lineage. This is the single most important gotcha in the language's history: the name describes a marketing alliance, not a family relationship.

Why an in-browser language mattered

Strip away the naming drama and the lasting contribution is clear. By putting a programming language inside the browser, JavaScript moved a category of work from the server to the client. A page could now check a form before submitting it, react to a mouse click, update part of the screen, or respond to the user without going back to the server for every small thing. Interactivity could live where the user was, instead of across a slow network connection.

That shift is the foundation of the dynamic web. Much of what later made web pages feel like applications rather than printed documents — the responsiveness, the in-place updates, the immediate feedback — descends from the basic capability that arrived in 1995: code that runs in the browser. The language was rushed and oddly named, but the architectural idea behind it was sound and consequential. The web stopped being a collection of static pages you navigated and started becoming a medium you could interact with directly.

YearMilestoneWhat it contributed
Early 1990sStatic pages, server round-tripsThe slowness an in-browser language would fix
May 1995Eich's ~10-day prototypeA scripting language running inside the browser
December 1995Renamed JavaScriptMarketing tie to Java, despite being unrelated
1997ECMAScript standardizedA vendor-neutral standard for the language

The table compresses the whole arc: a problem of slowness, a hurried prototype, a marketing rename, and finally a standard that let the language outlive its origin at a single company.

From one vendor to a standard

A language controlled by one browser maker could not remain the web's scripting language for long. Microsoft built its own implementation, JScript, for Internet Explorer, and without a shared definition the same risk that haunted HTML — incompatible dialects — loomed over scripting too. The resolution was to hand the language to a neutral standards body.

The standards body Ecma International took it up, and the first edition of the ECMAScript specification (ECMA-262) was published in 1997, giving the language a vendor-independent definition that any browser could implement. The awkward name "ECMAScript" exists precisely because "JavaScript" was entangled in trademark and marketing arrangements, so the standard needed a different label. That detail is a fitting endnote to the whole story: even the formal name of the standard is a workaround for the branding decision made in 1995. A language written in about ten days, named for a language it is not related to, became the standardized, universal scripting layer of the web — and the marks of its hurried, market-driven birth are still visible in it today.

Project Inquiry