Hour of Code: JavaScript

Welcome to Friday of CS Education Week!

undefined

Today we’re going to look at our third tutorial — “Creating Your Own Graphics with Javascript.” We’ll talk briefly about what Javascript is, what can be done with it, and why you should learn it.

Javascript actually has a storied history, and this story plays into exactly why Javascript is important and useful. Javascript was created (allegedly in just 10 days) by engineer Brandon Eich, who was working for Netscape Communications Corporation, the company behind the Netscape web browser.

At this point, the internet was mostly a collection of static HTML pages that users could access and read — nothing was dynamic, or personalized. The web was essentially a collection of word documents. Javascript was created in order to make websites dynamic and interactive — meaning that you could change the look of the website (and the underlying HTML file) by playing with elements on the page.

In 2005, the creation of AJAX turned Javascript from a cool tool into the foundation of web programming and web apps. AJAX stands for “Asynchronous Javascript And HTML”, and it is a technique that allows Javascript to exchange information with a database. This means that a web page can change without reloading — think of how Google auto-fills your search bar after you type a couple words, or how Google Maps loads new map images as you scroll around. All of this can happen because of Javascript — it runs in the background of your browser and changes what is displayed dynamically.

Hopefully this is painting a picture for you about why Javascript is a good language to learn — it helps to create dynamic, interactive websites, which are the standard on the internet today. However, there is an even more compelling reason to learn Javascript — you can do almost anything with it. Lately (as in within the past 5 years), the Javascript development scene has exploded as new tools are released that give developers the power to do things like create servers (node.js) and frameworks that allow applications to be built quickly and easily (backbone.js, angular.js).

As a new programmer, Javascript is a great first “real” language to tackle. It is powerful, and turns websites from static documents to web applications. It is versatile, and you can use it to do almost anything in the world of code. Finally, there are a ton of great resources out there, and it’s not too tough to learn. Get started with our Basic Javascript and Graphics Hour of Code!