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
![](/files/latest/en/2302449711/2302449720/1/1710344926087/image_14.png)
Iterative Loop
The simplest example of a loop is to repeat some action N times
![](/files/latest/en/2302449711/2302449719/1/1710344926084/image_24.png)
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
![](/files/latest/en/2302449711/2302449718/1/1710344926080/image_3_1.png)
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.
![](/files/latest/en/2302449711/2302449717/1/1710344926077/image_3_2.png)
Conditional Loop
The loop will run as long as the condition is true
![](/files/latest/en/2302449711/2302449716/1/1710344926074/image_43.png)
Iterating over the elements of a list
In this example, each element of the list is assigned 1
![](/files/latest/en/2302449711/2302449715/1/1710344926072/image_51.png)
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
![](/files/latest/en/2302449711/2302449714/1/1710344926068/image_61.png)