The 10-Day Mistake That Runs the Internet: How Brendan Eich Built JavaScript in a Panic — And Why We're Still Living With His Shortcuts
In May 1995, Netscape gave one programmer 10 days to invent a new language or the web would belong to Microsoft. He delivered JavaScript — brilliant, broken, and now running on 98% of all websites.
The 10-Day Mistake That Runs the Internet: How Brendan Eich Built JavaScript in a Panic — And Why We're Still Living With His Shortcuts
It was May 6th, 1995. Brendan Eich walked into Netscape's Mountain View office with a job most engineers would consider impossible: invent a programming language in ten days. Not design one. Not prototype one. Ship one. The web browser wars were heating up, Microsoft was threatening to bundle Internet Explorer with Windows 95, and Netscape's co-founder Marc Andreessen had made a promise to Sun Microsystems that couldn't be broken. The web needed a scripting language. It needed it now. And Brendan Eich — a 34-year-old compiler engineer who'd been at Netscape for exactly two weeks — was the only person crazy enough to try.
What he created in those ten sleepless days became JavaScript. Today, it's the most widely deployed programming language in human history — running on 98% of all websites, powering Node.js backends, React frontends, Electron desktop apps, and even Mars rover code. It's also one of the most hated, mocked, and misunderstood languages ever invented.
This is the story of how a brilliant engineer built a language under impossible constraints, made design decisions he'd regret for decades, and accidentally created the substrate of the modern internet.
The Panic at Netscape
In early 1995, Netscape Navigator owned the web. With 80% market share, it was the way people experienced the internet. But Marc Andreessen saw a problem: HTML was static. Designers could make pages, but they couldn't make them do anything. If you wanted interactivity — a form that validated itself, an image that changed on hover, a clock that ticked — you were out of luck.
Microsoft was coming. Windows 95 would ship in August with Internet Explorer bundled in, and Redmond had infinite resources to throw at the browser wars. Andreessen needed a weapon.
He found it in an unlikely place: Sun Microsystems had just released Java, and the tech press was going wild. Java applets could run in browsers! They were secure! Cross-platform! The future!
Andreessen struck a deal with Sun: Netscape would embed Java in the browser. But he had a secret plan. Java was too heavyweight, too complicated for web designers who were used to HTML. He wanted something simpler — a "scripting language" that looked like Java but was easy enough for non-programmers. Something that could manipulate the HTML on a page without requiring a computer science degree.
Sun agreed, with one condition: the language had to look like Java. It had to have Java-like syntax. It had to feel like Java's little brother. And it had to ship with Netscape Navigator 2.0 in September — four months away.
Andreessen needed a language designer. Fast.
Enter Brendan Eich
Brendan Eich was not supposed to be the guy. He'd been hired to implement Scheme — a elegant, minimalist Lisp dialect — in the browser. Eich loved Scheme. He'd spent years working on compilers and dreamed of bringing first-class functions and closures to the web.
But Andreessen had other plans. In late April, he called Eich into his office and delivered the news: forget Scheme. We need something that looks like Java. And we need it in time for the Navigator 2.0 beta release. You have ten days.
Eich's reaction was what you'd expect: are you insane?
Designing a programming language is a years-long process. You need to think through syntax, semantics, type systems, memory management, error handling, standard libraries, tooling. Languages like Python, Ruby, and Java had teams of engineers and years of iteration before their 1.0 releases.
Eich had ten days. And he was working alone.
He could have quit. He could have argued it was impossible. Instead, he did what great engineers do when faced with impossible constraints: he got creative.
The 10-Day Sprint
Eich locked himself in his office and started coding. His strategy was pragmatic: steal everything that works, ship the minimum viable language, and worry about elegance later.
From Scheme, he took first-class functions and closures — the ability to pass functions as values and create functions that "remember" their surrounding context. This was radical for 1995. C didn't have it. C++ barely had it. Java certainly didn't have it. But Eich knew it was the secret weapon that would make JavaScript expressive and powerful.
From Self (a prototype-based language from Xerox PARC), he took prototypal inheritance. Instead of classes and objects like Java, JavaScript would have objects that could inherit directly from other objects. It was weird, unfamiliar, and confusing — but it was simple to implement. No compiler, no type checking, no class hierarchies. Just objects linking to objects.
From Java, he took syntax. Curly braces. Semicolons. if/else, for, while. It was window dressing — underneath, JavaScript was nothing like Java — but it satisfied Sun's requirement and made the language feel familiar to the programmers of 1995.
And then he made compromises. Lots of them.
Automatic semicolon insertion? Sure, why not. Developers forget semicolons. The interpreter will guess where they should go. (This decision would cause bugs for the next 30 years.)
Type coercion? JavaScript would try to make sense of "5" + 3 by converting types automatically. Sometimes it would concatenate ("53"), sometimes it would add (8), depending on the operator. Was it confusing? Yes. But it meant fewer errors for beginners.
== vs ===? JavaScript got two equality operators. == would coerce types before comparing. === wouldn't. Developers would spend decades debugging the difference.
this keyword? Eich needed a way to reference the current object. He borrowed this from C++ and Java. But because JavaScript functions are first-class values that can be passed around, this would change depending on how the function was called. It was confusing, subtle, and would become one of the language's most infamous footguns.
Global variables by default? Forget to declare a variable with var, and it would leak into the global scope. Every script on the page shared the same global namespace. It was a recipe for disaster, but it was simple to implement.
Eich knew these were problems. He knew the language was rough. But he didn't have time for perfect. He had ten days.
On May 15th, 1995, he emerged with a working prototype. He called it Mocha.
The Name Game
Mocha didn't stick. Netscape's marketing team hated it. They renamed it LiveScript for the Navigator 2.0 beta in September. But even that didn't last.
In December 1995, Netscape announced a partnership with Sun Microsystems. To capitalize on Java's hype, they renamed LiveScript again: JavaScript.
It was a marketing move, pure and simple. JavaScript had almost nothing to do with Java. Different syntax philosophy, different type system, different execution model. But the name stuck. And it caused decades of confusion.
Java developers expected JavaScript to behave like Java. It didn't. Beginners thought you needed to learn Java before JavaScript. You didn't. The name was a lie that Eich would regret for the rest of his career.
But it worked. By riding Java's coattails, JavaScript got attention. And attention meant adoption.
The Explosion
JavaScript spread like wildfire. By 1996, every major browser had implemented it (or something close to it). Microsoft reverse-engineered JavaScript and shipped JScript in Internet Explorer 3. Developers started building image rollovers, form validators, pop-up windows, and DHTML effects. The web went from static to dynamic overnight.
But it was chaos. Microsoft's JScript wasn't quite the same as Netscape's JavaScript. Netscape submitted JavaScript to the European standards body ECMA to create a neutral spec. The result was ECMAScript — the official standard that JavaScript implementations would follow. (The first edition was published in June 1997.)
For years, JavaScript was dismissed as a "toy language." Real programmers used Java, C++, Perl. JavaScript was for animating snowflakes and validating email addresses. It was slow, quirky, and full of browser incompatibilities.
Then, in 2004, everything changed. Gmail launched, built entirely in JavaScript. It was fast, responsive, and felt like a desktop app. Google Maps followed in 2005, proving that JavaScript could handle complex, data-heavy applications. The era of AJAX (Asynchronous JavaScript and XML) had arrived.
Developers started taking JavaScript seriously. Libraries like jQuery (2006) smoothed over browser differences. V8 (2008) — Google's JavaScript engine for Chrome — made JavaScript fast. Suddenly, JavaScript wasn't a toy. It was a legitimate platform.
Node.js: JavaScript Escapes the Browser
In 2009, Ryan Dahl had a problem. He was building web servers and kept running into the same bottleneck: I/O. Reading files, querying databases, making network requests — all of it blocked the main thread. Servers would sit idle waiting for disks and networks while CPUs went to waste.
Dahl had an insight: JavaScript's event-driven, non-blocking model (designed for handling browser events like clicks and keypresses) was perfect for I/O-heavy servers. And V8 — Google's new engine — was fast enough to make it practical.
He built Node.js in a few months. JavaScript could now run on servers. Backend engineers were skeptical at first ("JavaScript on the server?"), but Node's performance and simplicity won them over. By 2015, Node.js was powering Netflix, LinkedIn, PayPal, and Uber.
JavaScript had escaped the browser. It was now a full-stack language — frontend, backend, mobile (React Native), desktop (Electron), even embedded systems.
The Modern Era
Today, JavaScript is everywhere. React, Vue, Angular. TypeScript (JavaScript with types). Deno and Bun (modern Node.js alternatives). Serverless functions on AWS Lambda. The language Brendan Eich built in ten days is now the substrate of the modern web.
But it's still carrying the scars of those ten days.
Developers still curse == type coercion. They still get bitten by this binding. They still accidentally create global variables. Tools like ESLint, Prettier, and TypeScript exist largely to protect us from JavaScript's footguns.
Brendan Eich has said repeatedly: if he'd had more time, he would have done things differently. He would have fixed this. He would have rethought type coercion. He would have made let and const the default instead of var.
But he didn't have more time. He had ten days. And in those ten days, he made the best decisions he could under impossible constraints.
The Legacy
JavaScript is a paradox. It's one of the most influential languages in history and one of the most flawed. It's loved and hated, often by the same people.
But here's the thing: it works. Despite its warts, JavaScript is expressive. First-class functions and closures make it incredibly flexible. Prototypal inheritance, once mocked, turns out to be elegant in the right hands. The event-driven model scales beautifully for I/O-heavy workloads.
JavaScript succeeded not because it was perfect, but because it was good enough — and it shipped when the web needed it most.
Brendan Eich built JavaScript in ten days under impossible pressure. He made compromises, cut corners, and shipped a language that was rough around the edges. And then billions of developers spent the next 30 years building on top of it, smoothing out the rough edges, adding features (ES6, ES2015, async/await), and turning it into the most ubiquitous programming language on Earth.
Every time you open a web page, every time you run npm install, every time you deploy a serverless function — you're living inside those ten days in May 1995.
The language that wasn't supposed to exist, built by one engineer in a panic, now runs the internet.
And we're still living with his shortcuts.
Keep Reading
The 3AM Email That Made GitHub Unstoppable: How Tom Preston-Werner Bet His Marriage on a Side Project and Built the Social Network for Code
In 2007, a Ruby developer couldn't sleep. His wife was furious. His day job was suffering. But he kept coding a tool that would change how 100 million developers collaborate — and accidentally create Microsoft's most expensive acquisition.
The 10KB File That Beat Silicon Valley: How a Finnish Student Built Git in 2 Weeks — While Linus Torvalds Raged at BitKeeper
When the company behind Linux's version control system pulled the free license in 2005, Linus Torvalds had two weeks to build a replacement from scratch — or watch the entire kernel development grind to a halt.
The 5-Minute Hack That Saved World of Warcraft: How One Engineer's Desperate Lua Script Stopped 12 Million Players From Quitting
In 2007, World of Warcraft's servers were melting under their own success. Players were rage-quitting by the thousands. Then a junior engineer named John Cash tried something that broke every rule in the Blizzard playbook — and accidentally invented a technology pattern that would reshape online gaming forever.