A Brief History of JavaScript
Tags: javascript, beginners, webdev
Published: 2020-09-14 08:53:51

JavaScript is the most popular programming language in the world and has been for years. How did this happen?


# The World Wide Web + JavaScript, Together Always (almost)
In 1993 a team led by Marc Andreessen at the University of Illinois released the Mosaic web browser. It was the first browser with a graphical user interface which made the web accessible to anyone who had even basic computer skills.


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/xamui421ykdldnny2bn3.gif)
*A young Marc Andreessen*

---

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ap1vmst3v04ckhhlu5k2.jpg)
*The Mosaic web browser*

---

The Mosaic team was based in a research center, the National Center for Supercomputing Applications (NCSA). As the Mosaic browser took off, the people who ran the NCSA slowly took control of it. Andreessen was pushed out, so he moved to Silicon Valley and found a job. But then he was approached by Silicon Valley legend Jim Barksdale to make something for the web. Andreessen decided to make another browser. He hired the old Mosaic team back, and they rebuilt a browser entirely from scratch. But this version was better, of course, because they learned from all their mistakes from the first one they made.


The result was the Netscape browser. It crushed Mosaic and it made Marc Andreessen the first of a new generation of young people made unbelievably rich by the internet.


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rte3jh0t0r40hi8goozz.jpg)
*Marc Andreessen, still young but now rich and famous*

---


# Webpages Needed Interactivity
From the very beginning, it was clear that webpages had a fundamental limitation: They weren’t interactive.

Every time you clicked on a link, the current page you were looking at would go away while a whole new page was fetched from a server and then rendered on your screen. This was because webpages could only use HTML and CSS. They needed something to make them come alive!


# JavaScript = Life
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/8rril6rjuhkbe7cy7c6j.gif)


Andreessen and Netscape believed that 2 languages needed to be supported in the browser: Java and a smaller, simpler scripting language. Roughly speaking, companies would build sophisticated stuff in Java. Designers, hobbyists, and hackers would build smaller things in this new scripting language that Netscape would create.

Andreessen tapped Brendan Eich to come up with something. And in 10 days, he invented the first version of JavaScript.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/zcsm4017xsw3w2wjf887.jpg)
*Brendan Eich, Father of JavaScript*

---

Except what Eich created wasn’t called JavaScript at first. Andreessen named it Mocha. (I guess coffee was the most inspiring thing around developers in the 1990s in Silicon Valley). Then the name was changed to LiveScript and shipped in a release of the NetScape browser in September 1995. But three months later, they changed the name again to JavaScript, which has since generated confusion for people everywhere. Why did they pick JavaScript? Marketing.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/yf6sv28wm467zc6wvw3j.jpg)

That’s right - marketing. Sure, JavaScript was inspired by Java but not enough to warrant including Java in the name. The truth is the NetScape team wanted people to associate their new language with the hot language of the day - Java - even if in reality the two languages weren’t connected in any meaningful way.

# JavaScript is Caught in a War
The internet was clearly the next technological wave, so everyone wanted in on it. Including Bill Gates.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/k188eo9s31yb8x927hh8.jpg)
*A young Bill Gates, seducing us with his operating system*

---

Bill Gates and Microsoft created Internet Explorer and bundled it with Windows software, which meant that Internet Explorer became the default web browser for most people. Over the next couple of years, Netscape and Internet Explorer battled for market share.

JavaScript got caught in the middle of this. Instead of using JavaScript, Microsoft created their own version called JScript (seriously). Netscape decided to try to find peace where great powers at war go to find peace: Switzerland.


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/z6rq9dh0lpid9vvi7ias.jpg)


Specifically, they went to ECMA, which used to stand for “European Computer Manufacturers Association”. But now it’s global and is just known as ECMA. ECMA sets standards for technologies so that they can safely and confidently be used everywhere.

Netscape put forth an ambitious proposal, ECMAScript 4, that would have made some huge additions to JavaScript. The language would become more sophisticated (which would have pleased big companies) but harder to use (which would have made it less accessible). Some famous JavaScript developers, like Douglas Crockford, did not agree with this direction. Neither did Microsoft. They also wanted to crush everyone else in the browser wars, so they weren’t particularly interested in playing nice. Ultimately, ECMAScript 4 never came to be.

The browser cold war continued for several years. Caught in the middle were developers who had to either build two sets of websites (one for JavaScript and one for JScript) or ask users to view their site on a specific browser.

# Developers Rise Up!
Despite being neglected by the big companies, it was developers who came to JavaScript’s rescue. It all started with a now-famous [blog post](https://web.archive.org/web/20190226075734/https://adaptivepath.org/ideas/ajax-new-approach-web-applications/) from a designer / developer named Jesse James Garrett. He introduced the world to a concept called Ajax (Asynchronous JavaScript + XML). The essence of the idea was that in the browser you could separate the fetching of the data from the presentation of that data. This enabled a much better experience for the user. No longer would they have to see a blank page and hourglass loading icon every time they clicked on a link. The concept behind Ajax was pretty simple:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1old68jnbelw1tiacjwk.png)
*Diagram from the original blog post*

---

Now asynchronous web applications are completely the norm, but in 2005 this was revolutionary!

Jesse James Garrett had opened the floodgates. Developers started building all kinds of sophisticated JS tools and frameworks. Most notably is JQuery which enables tons of things including easy DOM manipulation and Ajax requests. While the big companies squabbled, developers just got on with building great stuff. Decentralization for the win!


# The New Kids on the Block
Two guys, who happened to run a company called Google, took an interest in web browsers. Larry Page and Sergey Brin hired some engineers who had worked at Netscape (and then its spin-off Mozilla) to build a new browser. Larry and Sergey showed it to their boss / babysitter Eric Schmidt who was impressed. They assigned an up-and-coming young star at Google, Sundar Pichai, to run with the idea.

In 2008, Google released Chrome. The real hero in the story is the V8 engine that powers Chrome. The V8 engine outperformed the engines in all the other browsers. It showed the world that highly-performant applications could be written for the browser in JavaScript.

Ryan Dahl saw the power of the V8 engine and used it to create NodeJS which enabled developers to write web servers **in JavaScript**. Now with just JavaScript, developers could build the whole stack for an app.

# A New Beginning
JavaScript was too important and too popular to be neglected by the big companies any longer. They came together to finally agree upon one standard. This was ECMAScript 5. Almost 10 years after ECMAScript 4 was proposed, ECMAScript 5 was accepted as the standard and all the major browsers implemented support for it.

The reach and scale of the internet was continuing to grow and now JavaScript was firmly and indisputably attached to that rocketship. The result is that developers built even more stuff in JavaScript. Here’s a comparison of the number of packages built for major programming languages. The number of NodeJS packages just grows at another level:


![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/cc4jm9afr3060i56a6ql.png)


Among those packages are things like React, Redux, Vue, and Angular. The vast majority of web developers today use at least one of those frameworks to build web apps.

And to think that at the beginning, JavaScript was supposed to be a little scripting language. Look at how far the little language has come!


# The JavaScript Future is Bright
Big companies and individual developers continue to build JS tools and frameworks. WebAssembly (WASM) provides a high-performance complement to JavaScript. TypeScript elegantly adds typing to JavaScript while still enabling people to write Vanilla JS.

JavaScript’s uses may change in the future but it seems poised to continue to be an essential part of building modern web applications. Its future seems as bright as its past was interesting.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/enkyg02l8nmq20w2gwgl.jpeg)
*Marc Andreessen today looking at the bright future of JS that he helped create*

---

### Do you want feedback on your JavaScript code?
### Do you want to help other people get better at JavaScript?
### Come join our code review Slack group!
### Just click the link at the top of our landing page: https://antcode.dev.

---
**Sources & further reading**
[JavaScript Wikipedia Page](https://en.wikipedia.org/wiki/JavaScript)

[Auth0 History of JavaScript](https://auth0.com/blog/a-brief-history-of-javascript/)

[Fireship’s Weird History of JavaScript](https://www.youtube.com/watch?v=Sh6lK57Cuk4)

[How The Internet Happened by Brian McCollough](https://www.amazon.com/How-Internet-Happened-Netscape-iPhone/dp/1631493078/ref=sr_1_3?dchild=1&keywords=history+of+the+internet&qid=1600038200&sr=8-3#ace-6796040015)

**Image sources (in order of appearance)**
[One](https://www.thocp.net/biographies/andreesen_marc.htm), [two](https://www.zdnet.com/article/mosaics-birthday-25-years-of-the-modern-web/), [three](http://content.time.com/time/covers/0,16641,19960219,00.html), [four](https://giphy.com/gifs/happy-fathers-day-fathersday-YEL7FJP6ed008), [five](https://www.nndb.com/people/095/000031002/), [six](https://ally-marketing.com/effective-marketing-plan-elements/), [seven](https://www.thegentlemansjournal.com/bill-gates-life-in-pictures/), [eight](https://www.nytimes.com/2019/11/02/opinion/sunday/switzerland-capitalism-wealth.html), [nine](https://immagic.com/eLibrary/ARCHIVES/GENERAL/ADTVPATH/A050218G.pdf), [ten](https://medium.com/javascript-scene/how-popular-is-javascript-in-2019-823712f7c4b1), and [eleven](https://www.businessinsider.com/marc-andreessen-blames-america-coronavirus-failures-build-2020-4).