For loops


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]);


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


it works.thank you very much :slight_smile:


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