Lesson 3 of 10

Variables

A variable is a jar with a name on it.

Jars can hold:
  • numbers
  • words
  • yes or no
  • things
  • lists
  • helpers

Scene 1 of 5

This is a jar. A jar can hold one thing.

A jar named favorite . It is empty
Scene 1 of 5

Tip

Jars can hold numbers, words, and more!

Library

All about variables

What is a variable?

A variable is a jar. You write a name on the jar. Then you put something inside. Later, you can ask the jar, "What is inside?"

Same jar, new things

You can swap what is inside. The name on the jar stays the same.

Jars can hold many things

Here are some things a jar can hold.

Numbers
7
Words
Emma
Yes or no
true
Things
a cat with a name
Lists
red, blue, green
Helpers
a machine with a job

Words to know

  • variable = the jar
  • value = what is inside
  • name = the label