Get Started
Loops
On this page
  1. Repeat N Times
  2. Conditional Loop
  3. Counting Loop
  4. List Loop
  5. Break/Continue

Loops

Count, condition, counting, and list loops, plus break/continue. The counting loop and the list loop work by storing the current number or item in a local variable, so read that local variable inside the loop. The Break/Continue block can only be used inside a loop block.

Repeat N Times

Repeat N Times

Runs the blocks connected to do the specified number of times.

  • Input: number of repetitions [Number]
  • Output: none

Conditional Loop

Conditional Loop

Repeats the blocks while the condition is true (while) or while it is false (until). Select repeat while or repeat until from the dropdown.

  • Input: condition [Digital]
  • Output: none

Counting Loop

Counting Loop

Runs the blocks connected to do repeatedly while a local variable increases or decreases from the start number to the end number by the specified interval. This corresponds to a for loop in programming languages.

  • Input: start number [Number], end number [Number], interval [Number]
  • Output: none

List Loop

List Loop

Stores each item of the list in a local variable in order and runs the blocks connected to do for each. This corresponds to a list iterator in programming languages.

  • Input: list to iterate [List]
  • Output: none

Break/Continue

Break/Continue

With break out of loop selected, exits the loop block (break); with continue with next iteration of loop selected, skips the rest of the loop body and moves to the next iteration (continue). This block can only be used inside a loop block.

  • Input: none
  • Output: none