What does names[i] do?


#1

Can someone briefly explain me what goes on when we log this

names[i]

is this array calling the loop?


#2

No the loop goes from 0 to names.length so i is a just a number:

0 in the first loop
1 in the second loop 
aso

And you can access the n-th position in an array by using array[n-1] so what you do is you use the couting variable of your loop to go through the values of your array.