For loops inside of for loops - Step 4


#1


Hi, I am stuck at Step 4 of the section mentioned above.


I was wondering what I was doing wrong here, because I do similarly to what the hint says. Even besides that, I cant seem to see what I am doing wrongly. Would anyone care to explain to me?

Note: The Error message is as follows;
"Did you a for loop that loops over the friendPlaces array?"


var myPlaces = [1, 2, 3];
var friendPlaces = [3, 4, 5];

for (var i = 0; i < myPlaces.length; i++) {
  
    console.log(myPlaces[i]);
  
  for (var j = 0; j < friendsPlaces.length; j++) {
    
    console.log(friendsPlaces[j]);
  
  }

}


#2

your variable name is friendPlaces

inside of for loop friendsPlaces //added extra s


#3

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