Loops JavaScript--- 3. For loops



var vacationSpots = ['Paris', 'New York', 'Barcelona'];

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

HELP ME! What am I doing wrong?


What's the error message you're receiving?


Your code is correct. Print error msg please.


I have the same problem, the error message is "Did you console.log vacationSpots[i] within the for loop?"
i can't go forward


Please create your own topic to address this problem. To get sufficient assistance, you'll need to include;
- the exercise URL
- the code you tried
- the error message you received.

Thanks! :slight_smile:


solution: https://discuss.codecademy.com/t/help-learn-javascript-loops-number-3/66897/2


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