Staying up to date

Now that you know how to create variables with the turquoise block, let’s learn something super important – how to change what’s in them!

There are 2 new blocks here:

The set .. to block helps you set what’s in a variable.

Connect the variable you want to update to the hole in the middle, and the new value to the input on the side.

The math block lets you do some simple math.

Connect two inputs and select if you want to add, subtract, or otherwise combine them.

Now for the challenge:

Use the new blocks to update the variable to 8, and print it!

Hint: You can use the variable for the calculation.


Print the number 8

If your code prints anything or throws an error, it will show up here.