JS Introduction
JavaScript makes decisions and changes values. Start with a small calculation before adding buttons or browser features.
Where to run this
This example uses the JavaScript console playground. Select Run to execute it; the example does not run on this lesson page.
A practical example
const places = 12;
const booked = 5;
console.log(places - booked);
What happens
The console prints 7 remaining places.