3rd number added in a for i = 1,10 loop?

So i understand what for i = 1,10 does but ive seen programmers add a third number in a loop like this. For example for i = 1,10,0.45 do. Im really confused what does this third number do?

1 Like

The third value represents the step of the numeric for loop, in your example the step is 0.45, so for each cycle of the loop the control variable β€œi” is increased by that step value.

0.45 > 0.9 > 1.35 until it reaches the limit.

1 Like

It’s the amount to increase the variable by. Default is 1.

1 Like