Another type of loops

--Originally published at Codebuster

“While”, while incredible is not the only loop out there, it has a cousin named “for”.  For is a function that repeats a block of code the times it is stated, so in “for” loops we generally know how many times the block will be repeated, or even just what this number depends on.

A basic example is:

for

for-thing