Menu

Variables let you store values and use them later. Think of a variable as a labeled box — you put something in, and you can look at it whenever you need it.

Two ways to create variables

bubblecode gives you two English-like ways to assign a value:

variables.bubble

Both put ... into and set ... to do the same thing — pick whichever reads more naturally to you.

Using variables with say

You can print variables alongside text using the && operator, which joins values with a space:

greet.bubble

Changing a variable

Variables can be updated at any time. The new value replaces the old one.

update.bubble

Exercise

Exercise

Create a variable called "color" with the value "blue", then print "My favorite color is blue" using say and the && operator.

exercise.bubble

Quiz

Question 1 of 3

What does put "hello" into greeting do?