β³
A named box that stores a value in a program.
Start with the idea
A variable is a name given to a place in memory where a program keeps a value. The value can change while the program runs.
For example, a game might have a variable called score. It starts at 0 and goes up every time you collect a coin.
Variables can hold different kinds of data, such as numbers, text or true/false values.
SEE IT ANOTHER WAY
A visual model
MAKE IT CONCRETE
One small example.
EXAMPLEPAUSE & THINK
Quick check.
Choose the best answer, then see why.
YOUR PRIVATE FIELD NOTES
Save a thought for later.
Write down a question, a connection, or the one idea you want to remember. This note stays in your browser.
Key terms.
Further reading.
Good next steps from trusted learning and standards sources.