A variable is a named value that can be changed (varies). For example, you could create a variable called "First_Name" and then set the variable to whatever the learner types into a text input object:
Then, on a later page, you could retrieve the variable and display it back to the learner. For example, when the page loads, Text 1 will display something like "Hello, Name" (where Name is whatever the learner entered earlier).
You may create variables at any time through the "set" block. These are traditionally called "global variables" meaning that they can be set and retrieved from any page in your lesson.
By default, each lesson contains two variables "Variable1" and "List1"
You can rename these default variables, or create new variables. For example, to create a new variable called "Count":
You can set a variable to specific value. For example:
Or, you can modify a variable using add, subtract, append or set. For example, this will add 1 to the value of Count.
Use the get variable block to retrieve the value of a variable. For example, to make the Text 1 object display the Count variable:
The debug feature is a powerful way to quickly analyze how variables are changing at runtime.
The easiest way to display a variable is to use the name of the variable inside curly brackets within a text object. For example, if you store the learner’s first name into a variable called "name", then "Hello {{name}}, in this exercise..." would become something like "Hello Bianca, in this exercise…"