Jump to content

Template:Computer Programming/Control/11

From Wikibooks, open books for an open world

for loop

[edit source]

Quite often one needs a loop where a specific variable is counted from a given start value up or down to a specific end value. You could use the while loop here — but since this is a very common loop there is an easier syntax available.