The counter variable, i, stores the values 0, 1, and 2 as the loop repeats. But 0, 1, and 2 are also the indices of the elements in friends.