So every time the loop repeats, i stores an index of an element in the friends array. And we can use the index to access the element.