Intro To JavaScript

JavaScript is a programming language that was originally developed to increase user interactivity with websites, and has grown to become a useful programming language in the backend of applications as well. JavaScript is now one of the most popular and widely used programming languages for building web applications today.

After reading this article, you’ll be able to:

A brief history of JavaScript

The language we know today as JavaScript was originally written in 1995 (in only ten days) by an engineer named Brendon Eich. At that time, Java (which is a completely different programming language from JavaScript) was very popular for creating web pages, but Eich was trying to create a simpler-to-use language that could be used to write scripts that increased interactivity. The first, relatively small version of this new language was called Mocha, and then was re-named JavaScript and standardized so it would work across different browsers in 1996. Several updated versions were released in the late 1990s, and in the early 2000s, many frameworks were starting to be built around JavaScript as well.

In 2009, Node.js was released, which allowed programmers to write complete web applications in JavaScript, including both the frontend and backend code. Around this same time, the Node Package Manager (npm) was released, which made it easier for programmers to share and install pre-written packages of JavaScript code for accomplishing specific tasks.

In 2015, the ES6 version of JavaScript was released, which is the foundation of the modern JavaScript that you will be learning in this course. Since then, more and more frontend web development frameworks have been built upon JavaScript, including React.js, Angular, Vue, and many others. These frameworks have allowed developers to get new web applications up and running more quickly.

Why JavaScript is so useful today

There are two main reasons why JavaScript became so popular in web development; its ability to render dynamic content, and its ability to perform asynchronous tasks.

Static vs dynamic web content

One of the early benefits of JavaScript was its ability to handle dynamic content. In the early days of the web, all web pages were static, which means that the data displayed on the page was loaded by the browser ahead of time, and the page would need to be re-loaded for any updates to show up. Websites are dynamic when they are able to render new data without reloading the page, and this is the type of behavior that JavaScript was designed to do. For example, because of JavaScript, we are able to see new messages show up in a social media feed without having to refresh the page.

Performing asynchronous tasks

In order for the user to have a smooth experience working with a dynamic website, it needs to be able to accomplish tasks asynchronously. Many programming languages operate synchronously, which means that one operation needs to be completed before the next operation will begin.

What you've learned

Although JavaScript generally operates synchronously, the language allows us to easily write code that will allow multiple tasks to run at the same time. This allows a website to be more interactive, because multiple things can be happening “under the hood” at once while the user is exploring content. For example, you can interact with a page while a large amount of data is being fetched from a server in the background, without interrupting your experience. JavaScript allows many processes to run at once, and you can control this behavior in your application by writing different types of functions.

In this article, you’ve learned some of the early history of the JavaScript language. You’ve also been introduced to some of the aspects of the language that have helped it grow in popularity, including its ability to render dynamic content and accomplish tasks asynchronously. You can read more about the history and basic features of JavaScript on Wikipedia’s JavaScript page.