Category:Variables

Gets the value of the specified variable.

Variables are used as placeholders for values such as numbers or words. Variables allow for a lot of freedom in programming. Instead of having to type out a phrase many times or remember a number, computer scientists can use variables to reference them. Variable values can change throughout a program. Each time the variable name is used, it gets the current value of the given variable and passes it to the block it is attached to.

Parameters

Name Description
variable The name of the variable whose value is being called

Tips

  • If you decide to change a variable name while working on your project, you do not have to change all the other matching the block individually. Choosing to “rename all” variables with that name will automatically rename all the matching blocks used in your project.

Found a bug in the documentation? Let us know at documentation@code.org