Here you see the first statement
for (i=0;i<s.length;i++) here you set the standards for your loop method. I want my loop to start from 0 so I set at 0. And I want it to run the same function until a certain limit and so I set to run up to the length of s array, i<s.length. And for my last standard I set the increment, so that everytime it runs it will add one to the initial 0.
and then you run the function inside your function. As you can on the right side you get all values since the array had 4 elements it ran up to four times, each times incrementing the i by 1 and received 4 answers in return