---

Understanding the for Loop

[ Thanks to Andrew
Weber
for this link. ]

“The for loop starts with ‘for’ and is followed by a variable,
in the example below ‘i’. The for loop is designed to be used with
a list of items to work through, like files, numbers, folders, etc.
This list must be supplied in some form. The ‘do’ is followed by
the method of manipulation, what you want to do with the
information that you are working through. In the example the ‘do’
is simply to send to screen each of the numbers. Close the for loop
with the ‘done’.”

Complete
Story

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis