A Language in a Hurry
To understand JavaScript, you have to picture the tech world of 1995. Netscape Navigator was the king of the web, but a giant was waking up: Microsoft. The “browser wars” were heating up, and Netscape needed a secret weapon. The company wanted a simple,
“scripting language” that could be embedded directly into web pages, allowing non-programmers and designers to add a little interactivity—something more dynamic than static HTML. They hired developer Brendan Eich with a mandate that was both ambitious and absurd: create this new language, and do it before the next browser release. The timeline? Ten days. This impossible deadline is the single most important factor in JavaScript’s design. There was no time for academic purity or long debates. Eich had to make quick, pragmatic decisions, borrowing ideas and prioritizing functionality over perfection. The language, originally codenamed Mocha, had to simply work.
Dressed to Impress: The Java Influence
At the same time, another language was taking the programming world by storm: Java. Created by Sun Microsystems, Java was marketed as the future of enterprise software. Netscape’s marketing department saw an opportunity. They decided the new scripting language should be a “companion” to Java. The strategy was simple: make the new language look familiar to the growing legion of Java developers. This was a purely cosmetic decision. Eich was instructed to give his language a Java-like syntax. That’s why JavaScript has curly braces { } for code blocks, semicolons ; at the end of statements, and C-style control structures like if and for loops. The name was even changed from Mocha to LiveScript, and finally, in a marketing masterstroke, to JavaScript. It was a deliberate choice to ride Java’s coattails, even though the two languages are fundamentally different under the hood.
Under the Hood: A Lisp in Disguise
While JavaScript wore a Java-style coat, its engine was built from entirely different parts. Brendan Eich’s background and personal preference were in more powerful, flexible languages, particularly Scheme, a dialect of Lisp. He wanted to embed these powerful concepts into his new creation. From Scheme, JavaScript inherited some of its most defining features. The most important is the concept of “first-class functions.” This means functions are treated like any other variable: they can be passed as arguments to other functions, returned from functions, and assigned to variables. This functional programming DNA is what makes JavaScript so flexible and powerful, enabling patterns like callbacks and modern frameworks like React. So, while the syntax looks procedural and Java-like on the surface, the language's soul is far more dynamic and functional, a direct legacy of Scheme.
No Classes, No Problem: The Prototype Model
Another major design choice that diverged from Java was how objects work. Java uses a “classical” inheritance model, where you define a class (a blueprint) and then create instances of that class. Eich opted for a different, more obscure model inspired by a language called Self: prototypal inheritance. In JavaScript, there are no classes in the traditional sense (the class keyword added in 2015 is just “syntactic sugar” over the old system). Instead, objects inherit directly from other objects. Every object can have a “prototype,” which is another object it can pull properties and methods from. This creates a flexible “prototype chain” rather than a rigid class hierarchy. This choice was partly pragmatic—it was simpler to implement in ten days—and partly philosophical. It contributed to JavaScript's reputation for being quirky and difficult, as most programmers were trained on classical models, but it also gave the language a uniquely dynamic and malleable object system.













