Anyything wrong with this?


#1


https://www.codecademy.com/courses/learn-javascript/lessons/loops/exercises/for-loop?action=resume&link_content_target=interstitial_lesson


Can't identify incorrect syntax; by that I mean I already check the console.log content and (most likely) found nothing wrong
error : Did you console.log vacationSpots[i] within the for loop?


var vacationSpots = ['Burma', 'Bali', 'Beaches'];

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


#2

I have the exact same problem. The console shows the right output but still an error message. It should be a bug, right? Thanks for any help.

var vacationSpots = ['Edinburgh','New York','London'];

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

Error: Did you console.log vacationSpots[i] within the for loop?


#3

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