Realized that loop is going to the next iteration before i-- and becomes infinite.
One question. There is link on article about best way to write For loop in a russian version of Looping code lesson. And one of the examples from comments is (codepen):
All your task are correct. I like the additional work you put in (variations, input form) and that you paid attention to the details like leaving out the comma a the end of task 3.
i-- is at the position where we normally have a condition that checks if a value is true (continue the loop) or false (exit the loop).
When i = 1 the condition is true (because 1 == true) and the value gets reduced to 0 (because of --)
Loop runs with i = 0
Now with i = 0 the condition is false (because 0 == false) and the loop exits
Iām not really a fan of this version since the double use of the middle part as condition and value changer makes it confusion