// previous page's name
$previous = 'loops';
// page's name
$current = 'variables';
// next page's name
$next = 'threads';
// print top of page
In programming, a variable is a placeholder for some value, much like x and y are popular variables in algebra. In Scratch, variables are represented with blocks shaped like elongated circles, uniquely labeled by you. Variables, generally speaking, can be local or global. In Scratch, a local variable can be used by just one sprite; a global variable can be used by all of your sprites.
Variables allow us, for instance, to instruct a sprite to count up from 1:
A variable that only takes on a value of true (i.e., 1) or false (i.e., 0), incidentally, is called a Boolean variable.
With statements, Boolean expressions, conditions, loops, and variables now under your belt as building blocks, we can now explore two higher-level programming constructs, starting with threads.
// print bottom of page