3/7 for loops help needed


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

https://www.codecademy.com/courses/learn-javascript/lessons/loops/exercises/for-loop?action=lesson_resume

I believe i did the code correct but the program will not let me go further.

error message:
Did you log all the places you’d like to visit to the console?



var vacationSpots = ['Russia', 'Austria', 'Sweden'];

for (var i = 0; i < vacationSpots.length; i++) {
  console.log( 'I really want to go to ' + vacationSpots[i]);
}



The output in the console:
I really want to go to Russia
I really want to go to Austria
I really want to go to Sweden


#2

Hmmm… It would appear Codecademy’s SCT is very picky about the text you enter for this exercise.

Try using the console.log statement given in the instructions instead…

console.log('I would love to visit ' + vacationSpots[i]);

#3

Thnx!That helped.Now i feel a bit stupid, Sorry that i wasted your time. :-}


#4

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