The 10-Day Programming Language That Accidentally Runs the World: How Brendan Eich Built JavaScript in a Netscape Conference Room — While Management Told Him to 'Make It Look Like Java'
In May 1995, Brendan Eich had 10 days to invent a programming language that would make web pages interactive. Today, that language runs on 98% of all websites — and he still apologizes for parts of it.
The Impossible Deadline
It was April 1995. Brendan Eich walked into Marc Andreessen's office at Netscape Communications in Mountain View, California, and got handed a task that should have taken six months.
"We need a scripting language for the browser," Andreessen said. "Something to make pages interactive. And we need it in ten days."
Eich, a 34-year-old programmer who'd joined Netscape just weeks earlier, stared at him. Ten days? To design a programming language from scratch?
"Ten days," Andreessen repeated. "Microsoft is building something. We need to ship Navigator 2.0 in September, and this has to be in it."
There was one more constraint, delivered like a knife to the gut: "And make it look like Java. Marketing wants to ride the Java hype."
Brendan Eich would spend the next ten days creating JavaScript — a language that would eventually run on 1.8 billion devices, power trillion-dollar companies, and become the most widely deployed programming language in human history.
He would also create some of the most hated features in programming. And he knew it from day one.
The Browser War No One Saw Coming
To understand why Netscape was in such a panic, you have to understand what was happening in 1995.
Netscape Navigator owned 80% of the browser market. The web was exploding — from 130 websites in 1993 to 23,000 in 1995. But web pages were static. HTML could display text and images. That was it.
If you wanted to validate a form, you had to send data to a server, wait for a response, and reload the entire page. If you wanted animation, you embedded a Java applet that took 30 seconds to load on a 28.8k modem.
Microsoft had just announced Internet Explorer. Sun Microsystems was pushing Java as the future of the web. Netscape needed something that would let developers add interactivity without the heavyweight Java runtime.
They needed glue. Something simple. Something that could manipulate the DOM (Document Object Model — the tree structure of HTML elements), respond to user clicks, validate forms.
And they needed it now.
The 10-Day Sprint
Eich locked himself in a conference room in May 1995 with a whiteboard, a copy of the Scheme programming language spec, and a pot of coffee.
His goal: create a language that was:
- Easy for non-programmers (web designers, not CS PhDs)
- Looked like Java (to satisfy marketing)
- Worked like Scheme (because Eich loved functional programming)
- Shipped in ten days (because the deadline was real)
What emerged was a Frankenstein's monster of language design — and it was brilliant and broken in equal measure.
Day 1-3: The Core
Eich started with first-class functions — functions as values that could be passed around, returned, stored in variables. This came from Scheme and Self (a prototype-based language from Sun Labs).
var greet = function(name) {
return "Hello, " + name;
};
This was radical. Java didn't have this. C didn't have this. First-class functions would eventually enable callbacks, closures, higher-order functions — the entire functional programming paradigm that powers modern JavaScript.
But he also needed object-oriented features to appease the "make it look like Java" mandate.
Day 4-6: The Prototype Chain
Instead of classes (like Java), Eich chose prototypes (like Self). Every object could inherit from another object. No class definitions. No compilation step.
var person = {
name: "Brendan",
greet: function() { return "Hi, I'm " + this.name; }
};
var developer = Object.create(person);
developer.code = function() { return "Writing JavaScript..."; };
This was elegant — but confusing. Prototypes meant you could modify any object at runtime. You could even modify built-in objects:
String.prototype.shout = function() {
return this.toUpperCase() + "!!!";
};
"hello".shout(); // "HELLO!!!"
Powerful? Yes. Dangerous? Absolutely. This would lead to framework wars, namespace pollution, and the infamous "monkey-patching" debates.
Day 7-8: The Type System (Or Lack Thereof)
Eich made JavaScript dynamically typed — variables didn't declare types. You could assign a number, then a string, then an object to the same variable.
var x = 42; // number
x = "hello"; // now a string
x = { foo: "bar" }; // now an object
He also added automatic type coercion — the language would try to convert types implicitly to make operations work.
This is where things got weird.
"5" + 3 // "53" (string concatenation)
"5" - 3 // 2 (numeric subtraction)
true + true // 2 (boolean to number conversion)
[] + [] // "" (empty string)
[] + {} // "[object Object]"
{} + [] // 0 (wat.)
Eich later admitted: "I knew type coercion would cause problems. But the alternative was throwing errors everywhere, and that felt too harsh for a beginner-friendly language."
The result: JavaScript became simultaneously the easiest and the most confusing language for newcomers.
Day 9-10: The DOM Integration and Syntax
Final sprint. Eich wired JavaScript into the browser's DOM so you could manipulate HTML:
document.getElementById("myButton").onclick = function() {
alert("Button clicked!");
};
He borrowed Java's curly-brace syntax to satisfy management:
if (x > 10) {
console.log("x is big");
}
And he shipped it.
Ten days. May 6-15, 1995. Brendan Eich wrote the first version of JavaScript — originally called Mocha, then LiveScript, then renamed JavaScript for marketing reasons (to ride Java's hype, even though the languages had nothing in common).
The Launch That Almost Didn't Happen
Netscape Navigator 2.0 Beta shipped in September 1995 with JavaScript embedded. Developers could write:
<script>
document.write("Hello, World!");
</script>
And it would execute in the browser. No server. No compilation. Just code that ran on the client.
The reaction was... mixed.
Java developers hated it. "It's a toy language," they said. "Real programming requires strong typing and classes."
Web designers loved it. Suddenly you could validate form inputs before submitting. You could create image rollovers. You could open pop-up windows (which would later become the most hated feature on the web).
Microsoft reverse-engineered JavaScript and shipped JScript in Internet Explorer 3.0 in 1996. Netscape submitted JavaScript to ECMA International for standardization in 1996, resulting in ECMAScript (the formal spec that JavaScript implements).
By 1997, JavaScript was everywhere. By 2000, it was the only scripting language that worked across all browsers.
The Features Eich Regrets
In interviews over the years, Brendan Eich has admitted the design flaws he still winces at:
1. == vs ===
The double-equals operator does type coercion. The triple-equals doesn't.
0 == false // true (wat.)
0 === false // false (sane)
"" == false // true (wat.)
"" === false // false (sane)
"I should have made == strict from the start," Eich said.
2. this binding
The this keyword changes meaning depending on how a function is called:
var obj = {
name: "Brendan",
greet: function() { console.log(this.name); }
};
obj.greet(); // "Brendan"
var fn = obj.greet;
fn(); // undefined (this is now window/global)
Arrow functions (added in ES6 2015) fixed this, but for 20 years, developers struggled with this.
3. Global scope pollution
Variables declared without var became global automatically:
function oops() {
x = 42; // whoops, global variable
}
"Strict mode" (added in ES5 2009) made this an error, but the damage was done.
4. with and eval
Both features break JavaScript's lexical scoping and make code impossible to optimize. Both are now considered harmful and banned in strict mode.
The Turning Point: Node.js and the JavaScript Everywhere Era
For 13 years, JavaScript was trapped in the browser. Then in 2009, Ryan Dahl released Node.js — a JavaScript runtime built on Chrome's V8 engine that could run on servers.
Suddenly, you could write:
const http = require('http');
http.createServer((req, res) => {
res.end('Hello, World!');
}).listen(3000);
And run a web server in JavaScript. The language Eich built in 10 days for form validation was now powering Netflix, PayPal, LinkedIn, Uber.
React (2013), Vue (2014), and Angular (2016) turned JavaScript into the dominant frontend framework language. TypeScript (2012) added static typing on top of JavaScript, fixing Eich's type system regrets.
Today, JavaScript runs:
- 98% of all websites (Stack Overflow data)
- Electron apps (VS Code, Slack, Discord)
- Mobile apps (React Native)
- IoT devices (Node.js on Raspberry Pi)
- Serverless functions (AWS Lambda, Cloudflare Workers)
The Legacy: The Duct Tape of the Internet
Brendan Eich built JavaScript in 10 days under impossible constraints. He borrowed from Scheme, Self, and Java. He made design choices he later regretted. He shipped a language that was both brilliant and broken.
And it won.
Not because it was perfect. Not because it was elegant. But because it was there — in every browser, on every device, accessible to every developer.
JavaScript is the duct tape of the internet. It holds everything together, even when it shouldn't work.
Eich once said: "I never expected JavaScript to become the most popular language in the world. I thought it would last maybe three years before something better replaced it."
Thirty years later, JavaScript isn't going anywhere.
The 10-day programming language runs the world — bugs, quirks, and all.
And every time you click a button, submit a form, or see a notification pop up on a website, you're running code that traces back to a conference room in Mountain View, a pot of coffee, and a programmer with an impossible deadline.
The language that was supposed to "look like Java" became the most deployed code in human history.
Not bad for 10 days of work.
Keep Reading
The 3am Email That Killed Moore's Law: How Ilya Sutskever Convinced Sam Altman to Burn $100 Million on GPT-3 — By Proving Language Models Could 'Understand' With Zero Training
In June 2020, an OpenAI researcher sent a midnight email showing that a massive language model could learn tasks it was never trained for. Within 72 hours, Sam Altman bet the company's future on scaling — and accidentally started the race to AGI.
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 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.