Web Development / JavaScript
Lesson 17 of 30
JavaScript basics
JavaScript makes pages interactive. Declare variables with const (won't be reassigned) or let (will be). Open the browser console with F12 to experiment.
Key points
- const by default, let when it changes
- console.log() prints to the console
- Avoid var in new code
const name = "Lazo";
let score = 0;
score += 10;
console.log(name, score);Quiz · +10 XP
Which keyword declares a variable you won't reassign?
Log in to save progress and earn XP.