Index Variable

Program the index variable to track the user's progress through the app.

Step 1

Go to the Blocks editor to start programming the app’s internal memory. Use variables to store all the information the app needs to run. To keep track as the user walks through the app, create an Index Variable. Remember, a variable is a block that can store something that we want to use later. In this case, the Index Variable will track the question number of the quiz.

Step 2

  • Open the Variables drawer
  • Drag out an initialize global name block
  • Click “name” to rename the Variable to “Index”
  • Get a number block from the Maths drawer
  • Set the Index to “1”