AboutBlogContact
TechnologyDecember 4, 1995 2 min read 33

JavaScript: The 10-Day Prototype at Netscape

AunimedaAunimeda
📋 Table of Contents

JavaScript: The 10-Day Prototype at Netscape

It’s late 1995, and the "Browser Wars" between Netscape and Microsoft are heating up. Netscape needed a way to make the Web more interactive-something simpler than Java for "regular" developers. Brendan Eich was tasked with creating it, and he supposedly knocked it out in just ten days. Originally called Mocha, then LiveScript, and now "JavaScript" (thanks to a marketing deal with Sun), it's finally shipping in Netscape Navigator 2.0.

A Mix of Ideas

JavaScript is a strange beast. It takes the syntax of Java (to please the marketing department), the first-class functions of Scheme, and the prototypal inheritance of Self. It doesn't have classes, it has "objects that inherit from other objects." It’s loosely typed, which is already making some of my C++ colleagues cringe, but the flexibility is perfect for small scripts on a webpage.

// A simple script in the browser
function greet(name) {
    alert("Hello, " + name + "!");
}

// Interacting with the document
document.write("<p>The current time is: " + new Date() + "</p>");
greet("Web Developer");

The "Glitchy" Reality

Because it was built so quickly, there are some... interesting design choices. The global scope is a mess, and the way it handles this can be confusing. But the ability to manipulate the Document Object Model (DOM) on the fly is powerful. We can finally do form validation without a round-trip to the server!

Looking Ahead

Some people are dismissing JavaScript as a "toy language" for making things blink or scroll in the status bar. But I think they're missing the point. By putting a scripting engine in every browser, Netscape has turned the Web into a programmable platform. As the engines get faster and the DOM matures, we're going to see applications we can't even imagine yet. It might be messy, but it’s going to be everywhere.

Read Also

Dart: Google's Early Vision for a Structured Web (2011)aunimeda
Technology

Dart: Google's Early Vision for a Structured Web (2011)

Google just unveiled Dart at GOTO Aarhus. Is this the language that will finally replace JavaScript in the browser?

CoffeeScript: JavaScript with Class Sugar (2009)aunimeda
Technology

CoffeeScript: JavaScript with Class Sugar (2009)

JavaScript's prototypal inheritance is confusing. CoffeeScript 0.x brings us classes, arrows, and a beautiful Ruby-like syntax.

Macromedia Director: Lingo Scripting for Interactive CDs (1999)aunimeda
Technology

Macromedia Director: Lingo Scripting for Interactive CDs (1999)

Shockwave is the future of the web, and Director is the king of the 'multimedia' era. Let's write some Lingo for that interactive kiosk.

Need IT development for your business?

We build websites, mobile apps and AI solutions. Free consultation.

Get Consultation All articles