5. for loops inside of for loops



I don't understand. Even the given code won't be accepted by the last step
Error message:

"Did you write an if/else statement inside the second for loop?"

var myPlaces = ['Brazil', 'Mexico', 'Australia'];
var friendPlaces = ['Italy', 'Paris', 'Brazil'];

for (var i = 0; i < myPlaces.length; i++) {
  for (var j = 0; j < friendPlaces.length; j++) {
     if (myPlaces[i] === friendPlaces[j]) 
    			console.log('Match: ' + myPlaces[i]);


if statement should be on teh same indentation level as console.log()


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