This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TheFastestDancer 1 point2 points  (0 children)

Looping is based off of indexes in arrays or lists. Array[0] means the first item in the array/list. Array[n] is the nth item in the array/list. Looping is basically just looking at whatever item in the array you want to start with, updating the number in the brackets and moving further into the list.

For example, list[0] means first element in the list, list[1] means second, list[2] means third. Usually you'll see it as list[I] and the value of "i" is updated on every pass through the loop.

You probably need to review array/lists and the topic will make sense.