Who Invented JavaScript? The Brendan Eich Story
Learn about Brendan Eich, the programmer who created JavaScript in 10 days at Netscape in 1995. This guide covers his background, design decisions, the influences behind the language, and how one engineer's work shaped the entire web.
JavaScript was invented by Brendan Eich, an American computer scientist who created the language in approximately 10 days in May 1995 while working at Netscape Communications. What makes this story remarkable is not just the speed of creation, but the fact that a language built under extreme time pressure by a single developer went on to become the most widely used programming language in history, running on virtually every computing device with a web browser.
Understanding Brendan Eich's background, the constraints he faced, and the design decisions he made helps explain why JavaScript works the way it does today. Every quirk, every design pattern, and every strength of the language traces back to the choices made during those 10 days and the influences Eich brought to the table.
Brendan Eich's Background
Before joining Netscape, Brendan Eich had a strong academic and professional background in programming language design. He studied physics and mathematics at Santa Clara University, then earned a master's degree in computer science from the University of Illinois at Urbana-Champaign.
His professional experience before Netscape included work at Silicon Graphics (SGI) on networking and operating system code, and at MicroUnity Systems on digital signal processing. Crucially, he had deep familiarity with programming language theory, particularly with two languages that would heavily influence JavaScript's design:
| Language | Creator | What Eich Took From It |
|---|---|---|
| Scheme | Guy Steele, Gerald Sussman | First-class functions, closures, functions as values |
| Self | David Ungar, Randall Smith | Prototype-based inheritance (no classes needed) |
| Java | James Gosling (Sun Microsystems) | C-style syntax (curly braces, semicolons, keywords) |
| HyperTalk | Dan Winkler (Apple) | Event-driven programming model |
| AWK | Aho, Weinberger, Kernighan | Lightweight scripting language philosophy |
This combination of influences is what makes JavaScript unique. Most languages of the 1990s were either purely object-oriented (like Java and C++) or purely functional (like Haskell and ML). Eich blended functional programming concepts (from Scheme) with a prototype-based object system (from Self) and wrapped it in Java-like syntax (per Netscape's business requirement).
The 10-Day Creation Sprint
The Business Context
In early 1995, Netscape Navigator was the dominant web browser with over 80% market share. The company's co-founder Marc Andreessen wanted to add a scripting language to the browser that would be accessible to non-programmers: web designers, amateur developers, and hobbyists who found Java too complex.
Netscape had a licensing agreement with Sun Microsystems (Java's creator). The original plan was to embed Java in the browser as a complement to a simpler scripting language. The scripting language would handle quick tasks (form validation, simple animations) while Java applets would handle complex computation.
Eich was hired in April 1995, and his assignment was clear: create a language that looked like Java (familiar syntax), but was simpler and more accessible, similar to Microsoft's Visual Basic. The deadline was brutal because Netscape needed to ship the language with Navigator 2.0 before Microsoft could build a competing browser scripting solution.
What Eich Built
In those 10 days, Eich created the core of what would become JavaScript:
// Core features Eich built in those 10 days (1995)
// 1. Dynamic typing - variables hold any type
var name = "Brendan";
var age = 34;
var isCreator = true;
// 2. First-class functions (from Scheme influence)
function greet(person) {
return "Hello, " + person + "!";
}
var sayHi = greet; // functions are values, assignable to variables
sayHi("World"); // "Hello, World!"
// 3. Prototype-based objects (from Self influence)
var language = {
name: "JavaScript",
year: 1995,
describe: function () {
return this.name + " was created in " + this.year;
}
};
// 4. Event-driven model for browser interaction
document.onclick = function () {
alert("You clicked the page!");
};Design Under Pressure
Many of JavaScript's well-known "weird" behaviors (like "" == false being true, or typeof null returning "object") are artifacts of decisions made during this 10-day sprint. Eich has acknowledged these as mistakes, but they cannot be fixed now because changing them would break millions of existing websites. Backward compatibility is JavaScript's greatest strength and heaviest burden.
The Naming Journey
The language went through three names reflecting the chaotic business dynamics at Netscape:
- Mocha (May 1995): Eich's internal codename during development
- LiveScript (September 1995): The name when it first shipped in Netscape Navigator 2.0 beta
- JavaScript (December 1995): Renamed as part of the Sun Microsystems marketing partnership
The "JavaScript" name was a deliberate marketing decision. Java was the most hyped technology of 1995, and Netscape wanted to position their scripting language as "Java's little brother" for the web. Eich and others at Netscape have repeatedly noted this was a business decision, not a technical one. The two languages share syntax superficialities but are fundamentally different in design philosophy.
Eich's Key Design Decisions
Several decisions Eich made during the creation sprint and early development had lasting consequences for how billions of developers write code today.
First-Class Functions
Eich's most impactful decision was making functions "first-class citizens." This means functions in JavaScript are values that can be stored in variables, passed as arguments to other functions, and returned from functions. This concept came from Scheme and is the foundation for callbacks, event handlers, Promises, and virtually every modern JavaScript pattern.
// First-class functions: the most consequential design decision
// Functions as values
var operations = {
add: function (a, b) { return a + b; },
subtract: function (a, b) { return a - b; },
multiply: function (a, b) { return a * b; }
};
function calculate(operation, x, y) {
return operations[operation](x, y);
}
calculate("add", 10, 5); // 15
calculate("multiply", 4, 7); // 28
// This pattern enables callbacks (the backbone of async JavaScript)
function fetchData(url, onSuccess, onError) {
// In 1995, this pattern enabled non-blocking browser operations
var xhr = new XMLHttpRequest();
xhr.open("GET", url);
xhr.onload = function () {
if (xhr.status === 200) {
onSuccess(JSON.parse(xhr.responseText));
} else {
onError(new Error("Request failed: " + xhr.status));
}
};
xhr.send();
}Prototype-Based Inheritance
Instead of Java's class-based inheritance, Eich chose Self's prototype-based model. Objects inherit directly from other objects through a "prototype chain," with no classes required. This was simpler to implement and more flexible, though it confused generations of developers coming from class-based languages.
// Prototype-based inheritance (Eich chose this over Java-style classes)
// Base object
var vehicle = {
type: "unknown",
wheels: 0,
describe: function () {
return this.type + " with " + this.wheels + " wheels";
}
};
// Create a new object that inherits from vehicle
var car = Object.create(vehicle);
car.type = "sedan";
car.wheels = 4;
car.honk = function () {
return "Beep beep!";
};
car.describe(); // "sedan with 4 wheels" (inherited method)
car.honk(); // "Beep beep!" (own method)
// The prototype chain: car -> vehicle -> Object.prototype -> nullDynamic Typing
Eich made JavaScript dynamically typed, meaning variables can hold any type of value and types are checked at runtime, not compile time. This made the language more accessible to non-programmers (no type declarations needed) but introduced a category of bugs that statically typed languages catch automatically.
The typeof null Bug
Perhaps the most famous bug in JavaScript history: typeof null returns "object" instead of "null". This happened because of how Eich implemented type tags in the original engine. Values were stored with a type tag, and the tag for objects was 0. null was represented as the NULL pointer (address 0), so its type tag was read as 0, matching "object." Eich has confirmed this was a bug, but fixing it would break too much existing code.
// The most famous bug in JavaScript
console.log(typeof null); // "object" (bug since 1995)
console.log(typeof undefined); // "undefined" (correct)
console.log(typeof 42); // "number" (correct)
console.log(typeof "hello"); // "string" (correct)
console.log(typeof true); // "boolean" (correct)
console.log(typeof {}); // "object" (correct)
// The safe way to check for null
var value = null;
console.log(value === null); // true (use strict equality)After JavaScript: Eich's Continued Impact
Mozilla and Firefox
After Netscape was acquired by AOL in 1999, Eich became a key figure in the Mozilla project, the open-source initiative that grew out of Netscape's decision to release its browser source code. He served as Mozilla's CTO and briefly as CEO. The Mozilla project produced Firefox, which played a crucial role in breaking Internet Explorer's browser monopoly and pushing web standards forward.
The Brave Browser
In 2015, Eich co-founded Brave Software and created the Brave browser, which focuses on privacy and blocks ads and trackers by default. Brave also introduced the Basic Attention Token (BAT), a cryptocurrency-based system for compensating content creators. As of 2026, Brave has over 70 million monthly active users.
| Year | Role | Contribution |
|---|---|---|
| 1995 | Netscape engineer | Created JavaScript |
| 1998-2014 | Mozilla CTO/CEO | Co-founded Mozilla, oversaw Firefox development |
| 2015-present | Brave CEO | Created privacy-focused Brave browser |
The Legacy: How One Engineer Shaped the Web
The language Brendan Eich created in 10 days now:
- Runs on approximately 98% of all websites
- Powers the frontend of every major web application (Gmail, YouTube, Netflix, X, Reddit)
- Runs on servers via Node.js at Netflix, PayPal, LinkedIn, and NASA
- Has the largest package ecosystem in any programming language (npm: 2M+ packages)
- Has been the most used language in the Stack Overflow Developer Survey for 11+ consecutive years
- Is maintained by the TC39 committee at Ecma International, with annual specification updates
Best Practices: Lessons from Eich's Design Philosophy
Design Principles That Still Apply
Eich's original design philosophy contains principles every JavaScript developer should understand.
Simplicity enables adoption. Eich deliberately made JavaScript simpler than Java because the target audience was web designers, not systems programmers. This principle still applies: write JavaScript that is readable and straightforward, even when you know advanced patterns. The best code is code your teammates can understand immediately.
Flexibility is a feature, not a bug. JavaScript's dynamic typing and prototype-based inheritance give you multiple ways to solve problems. Instead of fighting this flexibility, embrace it. Use object literals when you need a quick data structure. Use classes when you need formal inheritance. Use functions when you need reusable behavior. The language supports your style.
Backward compatibility matters above all. JavaScript has never broken old code. A script written in 1995 still runs in 2026 browsers. This commitment to backward compatibility is why the web works. When writing your own code, think about how changes affect existing users and consumers of your APIs.
First-class functions are your greatest tool. Eich's Scheme influence gave JavaScript its most powerful feature. Callbacks, array methods (.map(), .filter(), .reduce()), Promises, event handlers, and React components all depend on treating functions as values. If you master one concept in JavaScript, make it this one.
Common Mistakes About JavaScript's Origin
Frequently Repeated Myths
These misconceptions appear even in popular tutorials and interview prep materials.
Claiming JavaScript was "copied from Java." JavaScript's C-style syntax (braces, semicolons, keywords) resembles Java, but the language's core architecture came from Scheme (functional) and Self (prototypal). The Java-like syntax was a business requirement from Netscape management, not a technical design choice.
Dismissing the 10-day timeline as meaning "JavaScript was poorly designed." The 10-day sprint produced the language prototype. Eich and the Netscape team continued refining it afterward. Many of JavaScript's strongest features (first-class functions, closures, object literals) were deliberately designed, not accidental. The genuine bugs (like typeof null) are relatively minor compared to the overall design.
Saying Brendan Eich "just got lucky." Eich had deep expertise in programming language design, including knowledge of Scheme, Self, and compiler theory. The design decisions that made JavaScript so enduring (first-class functions, prototype chains, event-driven model) came from years of language research, not luck.
Attributing JavaScript's success solely to browser monopoly. While being the only browser language helped, JavaScript's explosion beyond the browser (Node.js, React Native, Electron) proves the language has genuine qualities that developers value: flexibility, a massive ecosystem, and rapid iteration capability.
Next Steps
Explore the full JavaScript timeline
Read the complete history of JavaScript to see how the language evolved from Eich's 1995 prototype through browser wars, the ES4 failure, the Node.js revolution, and the modern ES6+ era.
Understand JavaScript's technical evolution
Learn how JavaScript evolved from ES1 to modern ES6+ to see exactly which features were added in each version and why they were needed.
[Start coding](/tutorials/programming-languages/javascript/how-to-start-coding-in-javascript-for-beginners) with modern JavaScript
Apply your understanding of JavaScript's origins by writing modern code. Start with variables and data types, then functions, then build interactive projects that use the event-driven model Eich originally designed.
Appreciate first-class functions
Practice using functions as values: store them in variables, pass them as callbacks, return them from other functions. This is Eich's greatest gift to JavaScript and the pattern underlying virtually every modern JS framework.
Rune AI
Key Insights
- Solo creator: Brendan Eich created JavaScript alone in approximately 10 days at Netscape in May 1995, drawing on his deep knowledge of programming language theory
- Three influences: Scheme gave JavaScript first-class functions, Self gave it prototype-based inheritance, and Java gave it familiar C-style syntax
- Marketing name: "JavaScript" was chosen to capitalize on Java's 1995 popularity; the two languages have no technical relationship beyond superficial syntax similarities
- Quirks are permanent: Bugs like
typeof null === "object"cannot be fixed because backward compatibility prevents breaking millions of existing websites - Ongoing legacy: Eich co-founded Mozilla (Firefox) and Brave browser, while JavaScript itself is now maintained by the TC39 committee with annual specification updates
Frequently Asked Questions
Who exactly invented JavaScript?
Why was JavaScript created in only 10 days?
Did Brendan Eich invent JavaScript alone?
Why does JavaScript have so many quirks and weird behaviors?
Is Brendan Eich still involved with JavaScript?
Conclusion
Brendan Eich's creation of JavaScript in 10 days at Netscape in 1995 is one of the most consequential events in computing history. His unique combination of influences from Scheme (first-class functions), Self (prototypal inheritance), and Java (familiar syntax) produced a language that was accessible enough for web designers yet powerful enough to eventually run everything from Gmail to NASA mission control software. Understanding Eich's design decisions and the constraints he faced gives you deeper insight into why JavaScript works the way it does and helps you appreciate both its strengths and its well-known quirks.
More in this topic
OffscreenCanvas API in JS for UI Performance
Master the OffscreenCanvas API to offload rendering from the main thread. Covers worker-based 2D and WebGL rendering, animation loops inside workers, bitmap transfer, double buffering, chart rendering pipelines, image processing, and performance measurement strategies.
Advanced Web Workers for High Performance JS
Master Web Workers for truly parallel JavaScript execution. Covers dedicated and shared workers, structured cloning, transferable objects, SharedArrayBuffer with Atomics, worker pools, task scheduling, Comlink RPC patterns, module workers, and performance profiling strategies.
JavaScript Macros and Abstract Code Generation
Master JavaScript code generation techniques for compile-time and runtime metaprogramming. Covers AST manipulation, Babel plugin authorship, tagged template literals as macros, code generation pipelines, source-to-source transformation, compile-time evaluation, and safe eval alternatives.