Loops


#1

var vacationSpots = [1, 2, 3];

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

console.log each item in vacationSpots on a separate line. To do this, list out each item using property access.

please can any one help me in this lesson above?


#2

The exercise
https://www.codecademy.com/en/courses/learn-javascript/lessons/loops/exercises/for-loop-ii
have you tried doing the console.log() without the
'I would love to visit ' +
or do a Refresh Browser using the F5-functionKey


#3

After some research...
use the Button beside the =RUN= Button
and the exercise will be =reset=
and take it from there.... using the =other= Array.


#4

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