For loops


#1


I don't know where the problem is here!! I even got the code but i cannot go through the exercise. Thank you!! It asked me:"Did you console.log vacationSpots[i] within the for loop?"



var vacationSpots = ['Paris', 'New York', 'Barcelona'];

for (var i = 0; i < vacationSpots.length; i++) {
  console.log('I would love to visit ' + vacationSpots[i]);
}

#2

It wants you to just print vacationSpots[I], not any of the rest:


#3

it works.thank you very much :slight_smile:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.