[Learn JS > Loops(2/7)] Error: Did u console.log vacationSpots[0]?


Link to lesson:

Instruction so far:
2. Next, console.log each item in vacationSpots on a separate line. To do this, list out each item using property access.

Did you console.log vacationSpots[0]?

My code:

var vacationSpots = ['asd', 'asda', 'asdasd'];
console.log (vacationSpots[0]);
console.log (vacationSpots[1]);
console.log (vacationSpots[2]);

Here's how my code looked it:

I tried to reset it:

But it still has the same error:

Another attemp but still has the error



console.log (vacationSpots[0]);

remove the space before (


Thank you!

What a shame I finished the old Javascript course and didn't even know this...


Hi sorry to bother you..

I see thats the problem was with the white space. But as what I've mentioned in my original post, I reset the activity and still got the same error. After I reset the activity it showed me another code and it was able to display to the console, but the error is still there.By any chance do you know what could have caused the error in this? Thanks again


can you please post that code?


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