1. Overview#
JavaScript (JS) is one of the most widely-used programming languages in the world as it is the default language for making interactive and dynamic web pages.
In this module, you will learn the syntax of JavaScript as a general purpose programming language. In later modules you will learn how JavaScript is used to build interactive web pages.
1.1. Why Learn JavaScript?#
After learning JavaScript you will be able to:
Understand the code of existing web pages
Build your own interactive web pages
JavaScript is also used as a general purpose programming language and is now widely used to build dynamic backends through frameworks such as Node.js.
Aside from these tangible outcomes, learning JavaScript and front end web programming will broaden your understanding of programming concepts.
1.2. Recommended Video#
To get up to speed on the history of Javascript, watch the video below.
1.3. The Birth of JavaScript#
JavaScript was created in 1995 by Brendan Eich, a developer at Netscape Communications. Netscape wanted a language to enhance interactivity on web pages. The language was initially called Mocha (later renamed LiveScript), it was finally branded as JavaScript to exploit the popularity and hype of Java at that time.
Microsoft soon created their own version of JavaScript called JScript, leading to inconsistencies across web browsers. To address this, JavaScript was standardised by the European Computer Manufacturers Association (ECMA) in 1997. This led to the creation of ECMAScript, the standardised version of JavaScript we use today.
1.4. The Evolution of JavaScript#
When JavaScript was first introduced, it was limited to small tasks like form validation e.g., ensuring a user entered their email address. Since then JavaScript has expanded into powerful language that runs not just in browsers but also on servers and even hardware devices.
Key milestones in JavaScript’s evolution:
1990s–2000s: JavaScript gained popularity for making web pages interactive with animations, dropdown menus, and form handling.
2009: The release of Node.js, a runtime that allows JavaScript to run on servers, opened the door for full-stack development.
2015: ECMAScript 6 (ES6) introduced significant features like let, const, arrow functions, and classes, modernising JavaScript.
1.5. JavaScript’s Impact#
Without JavaScript, the web as we know it wouldn’t exist. Websites would remain static and unable to respond to user actions in real-time. JavaScript enables:
Interactive content like video players, image sliders, and dynamic forms.
Single-page applications like Gmail and Twitter that load content without reloading the entire page.
A more accessible and engaging internet for billions of users.
The language’s growth has been so significant that even computer hardware manufacturers, such as Apple and Qualcomm, now design their processors to include JavaScript specific instructions, ensuring websites run smoothly on all kinds of devices.