Read the Code π
Welcome! π You're about to write real JavaScript. We'll go one tiny step at a time, and you can't break anything.
Coders read a lot of code before they write any. So let's warm up by reading a couple of tiny programs and predicting what they do.
A variable is a named box that holds a value. You make one with const (a box
whose value never changes) or let (a box you can change later):
const name = "Boots";
let score = 10;
score = 20; // ok, because it's "let"
The words in "quotes" are a string β that's coder-speak for text. π§΅
Read the snippets in each question, then pick what you think the answer is. π