Jump to content

Template:Computer Programming/Control/12

From Wikibooks, open books for an open world

for loop on arrays

[edit source]

Another very common situation is the need for a loop which iterates over every element of an array. The following sample code shows you how to achieve this: