What is JavaScript?

A quick tour of the language that runs the web.

JavaScript is the programming language of the web. It runs inside every modern browser, on servers (via Node.js), in desktop apps, and even on tiny embedded devices.

If you've ever clicked a button on a website and seen something change instantly that's almost certainly JavaScript at work.

Your first script

Open your browser's developer console (press F12), click the Console tab, and type:

console.log("Hello, world!");

Press Enter. You'll see the message printed back. Congratulations you just ran your first line of JavaScript.

Where JavaScript runs

  • In the browser to make pages interactive.
  • On servers using Node.js, the same engine that powers tools like this site.
  • Everywhere else mobile apps, games, command-line tools, even small hardware.

What you'll learn in this course

  1. How to store data in variables.
  2. How to make decisions with if / else.
  3. How to repeat work with loops.
  4. How to package logic into functions.
  5. How to react to user actions in the browser.

Ready? Let's start with variables.