A set of blocks that allow you to set a set of actions with a predetermined number of repetitions, as well as for bypassing lists


Iterative Loop

The simplest example of a loop is to repeat some action N times


The loop with the counter will be executed while the variable i is less than 5. In this case, after each step, the variable i will increase by 1


Such a loop is a more convenient notation for Conditional Loop

Loops with a counter are convenient for iterating over the elements of a list. In this example, each i-th element of the list is assigned the value i

That is, the 1st element = 1, the 2nd = 2, etc.


Conditional Loop

The loop will run as long as the condition is true


Iterating over the elements of a list

In this example, each element of the list is assigned 1


Loop exit

A block can only be used inside a loop. Usually, a loop exits when a certain condition is met

In the example, the loop exits at the moment when the loop counter i exceeds the length of the list list