β Software Engineering
Variables: labelled boxes
See it
A variable is a labelled box
- A variable has a name (the label) and a value (what's inside).
let lives = 3;makes a box calledlivesholding 3.- You can swap what's inside later:
lives = 2;.
Name
lives
Box
holds a value
Value
3