Loops through a block of commands according to a counter.
Show allUsagesExamplesRelated
for variable = start to end [step inc] ... end
Loops over the instructions between the for and end statements, incrementing the given variable at the end of each loop.
for i = 1 to 3 echo $i end for i = 1 to 100 step 3 echo $i end
foreach
while