Chapter 1: Introduction to Javascript

1.1 What is Javascript?

The easiest way to answer this question is –

Javascript is the programming language of the web; it allows you to add interactivity to your web pages.

Invented by Brendan Eich in 1995, it has become one of the most popular and commonly used programming languages.

Back in the pre-Javascript era, web pages were static pages that only allow for one-way communication – from the webmaster to the reader. Now, web pages are much more interactive and part of this interactivity is achieved with Javascript programming.

Some of the things you can achieve with Javascript include getting information from users, displaying customized information to them, responding to users’ behaviors (such as a click) and validating users’ form inputs.

In fact, Javascript is more powerful than that. It can also be used in environments that aren't web-based, such as PDF documents and desktop widgets. However, the most common use of Javascript is to programme web pages and that is the focus of this site.

Javascript comes with a lot of pre-written code that helps to simplify various tasks in Javascript. These codes are typically organized in libraries. A library is a collection of code (written by other programmers) that we can use in our own code. Some of the popular Javascript libraries include jQuery, AngularJS etc. Once you learn basic Javascript, you can easily learn to use these libraries to facilitate and speed up your coding.