Caffeinated Coder
Book an appointment
Lesson 01 · Basics

What JavaScript is

JavaScript is the programming language of the web: every browser has an engine that runs it, and Node.js runs it outside the browser too. Follow a button that counts clicks, from the HTML page and the script tag, through three lines that run once, to a function that runs on every click, updates a variable, changes the page and writes to the console.

9 min11 steps5 questionsBeginner
Fig 1 · Interactive
Loading figure…
or ← →
Put it into practice

Try it

0/1 exercises passed

Make JavaScript calculate

A coffee costs 3 and you buy 2. Store their product in total, then print total with console.log().

Ctrl/Cmd + Enter to run. Tab indents; Escape then Tab leaves the editor.

Ready
Output
Run your code to see its output.
Checks
  • Check your code when you’re ready.

Quiz Unlocks after the last step.