DEMO #1: In this demo, you'll use a variable to store a number, then use that variable in a command!

A variable is a name that stores a value. A variable creation statement uses an equal sign to connect the name to the stored value. We are storing the integer 360 in the spin variable.

  • Run the demo. Follow the onstage instructions to learn more about variable creation statements.
  • Try changing the number in spin and clicking Run again to see what changes on stage!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)