DEMO: Custom blocks are great, but there's a better way of repeating code.

A for loop lets us set a range. The range is the number of times that the set of commands will repeat.

  • Click Run and follow along with the activities on the stage.
  • When you're finished click Submit and Next to continue.

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)