Free lesson · JavaScript Basic to Advance
How JavaScript Was Born
What Is JavaScript, Really?
JavaScript is the programming language that runs the web. Every interactive thing you've ever clicked on a webpage — a dropdown, a form, a live search box, a video player — is running JavaScript. It also runs on servers, in build tools, in mobile apps, and in places its creator never imagined.
But here's the thing nobody told me when I started learning JavaScript: this language was designed in ten days. Ten days. Under commercial pressure. By one person. In 1995. And once you know that, everything weird about JavaScript starts to make sense.
Why Knowing the Origin Story Matters
I learned JavaScript at age 26, on freeCodeCamp, in a small apartment in Warsaw after four years working as a financial analyst. Nobody told me JavaScript had a history. The tutorials just said "this is how you write a function" and "this is what var does" and I memorized it all without understanding why anything was the way it was.
Then I'd hit something strange. Why does 0.1 + 0.2 not equal 0.3? Why does typeof null return "object"? Why are there three different ways to declare a variable? Why does this change meaning depending on how you call a function?
The answer to almost all of these is the same: JavaScript was built in ten days, and the decisions made in those ten days could never be fully undone. Once the language shipped and millions of websites depended on it, the weird parts became permanent. Knowing this isn't trivia — it's the mental model that makes the rest of the language make sense.
The Ten Days That Made JavaScript
Interactive animation: Netscape's two requirements - approachable for designers, yet looking like Java - and ten days to resolve both.
In May 1995, Netscape was the dominant web browser. Netscape's leadership wanted a scripting language for their browser. They had two requirements that didn't fit together neatly. The language needed to be approachable for designers and casual developers — so it had to look simple. And it needed to be marketed alongside Java, which was the hot new technology that year — so it had to look like Java, even if it didn't behave like it.
They hired a programmer named Brendan Eich and gave him ten days to build a working prototype.
Eich's actual instincts were different from the brief. He wanted to build something inspired by Scheme — a language where functions were first-class values, where you could pass them around like numbers or strings. He wanted dynamic typing, flexible objects, and a small core. Management wanted curly braces and C-style syntax to ride Java's marketing wave.
What Eich shipped in ten days was a compromise. JavaScript looks like Java on the surface — curly braces, if statements, the word function. But it behaves like a completely different family of languages underneath. Functions are values. Objects are flexible. Types convert silently. Inheritance works through prototypes, not classes.
graph LR
A[May 1995: Brief given to Brendan Eich] --> B[10 days: Working prototype built]
B --> C[September 1995: Shipped in Netscape Navigator 2.0 beta]
C --> D[1996: Microsoft reverse-engineers it as JScript]
D --> E[1997: Submitted to Ecma International as ECMAScript]
style B fill:#7c3aed,color:#fff
This diagram shows the compressed timeline of JavaScript's creation. In May 1995, Brendan Eich was given a brief to design a scripting language. Over the next ten days, he built a working prototype. By September 1995, the language shipped in Netscape Navigator 2.0 beta. In 1996, Microsoft reverse-engineered it for Internet Explorer and called their version JScript. In 1997, the language was submitted to the Ecma International standards body and standardized as ECMAScript.
The language was originally called Mocha. Then LiveScript. Then, just before launch, Netscape's marketing team renamed it JavaScript — a decision driven entirely by Java's popularity, not by any technical connection between the two languages. To this day, the name causes confusion. JavaScript is not Java. JavaScript was never Java. The name is a marketing artifact from 1995.
Interactive animation: What Eich actually wanted - functions as values, dynamic typing, flexible objects and a small core - in Java's clothing.
What the Ten-Day Origin Explains
Here's a snippet of JavaScript that surprises every learner:
console.log(typeof null);
console.log(0.1 + 0.2);
console.log("5" - 3);
console.log("5" + 3);
console.log([] + []);
Each of those lines produces a result that doesn't match what most people expect. typeof null returns "object" (a bug from the original implementation that could never be fixed because too many websites depended on it). 0.1 + 0.2 is 0.30000000000000004 (a consequence of floating-point representation, which Eich didn't have time to abstract away). "5" - 3 is 2 (silent type coercion). "5" + 3 is "53" (different silent type coercion, depending on the operator). [] + [] is "" (the weirdest one — the result of how JavaScript converts arrays to primitives).
None of these are random. Every single one of them traces back to design decisions made in those ten days, locked in when the language shipped, and preserved forever because breaking them would break the web.
When you understand this, you stop being surprised by JavaScript. You start expecting the weirdness, recognizing it, and working with it instead of against it.
Note: JavaScript has had decades of evolution since 1995. The language has gotten significantly better —
letandconstfixed many problems withvar, classes added cleaner syntax over prototypes, modules replaced ad-hoc patterns. But the original weirdness is still there underneath, because removing it would break millions of existing websites. This is what people mean when they talk about JavaScript's "backwards compatibility constraint."
Interactive animation: Five results nobody predicts, from typeof null to [] + [], each traced back to its cause.
Why This Matters in Interviews
Interview: Interviewers occasionally ask history questions — not because the history is essential, but because they want to see whether you understand the language deeply or just memorize syntax.
If someone asks "why does JavaScript have these weird type coercion rules?", the wrong answer is "I don't know, that's just how it is." The right answer is "JavaScript was designed in ten days under commercial pressure, and many of its early decisions got locked in once the language was widely adopted. The coercion rules are part of that legacy." That answer signals depth.
More importantly, the historical context unlocks the rest of the course. Every weird thing you'll learn about — prototypes,
this, the event loop, hoisting — makes more sense once you know the language was a ten-day compromise.
Try It
Exercise: Open a JavaScript console — either in your browser's developer tools (F12, then the Console tab) or in any online JavaScript editor.
Try these expressions one at a time and predict what each one will return before you run it:
typeof NaN 1 / 0 -1 / 0 0 === -0 Math.max()Some of the answers will surprise you. That's the point. Make a note of which ones surprised you — by the end of this course, you'll understand why each one returns what it does, and the historical reasons behind every weird answer.