5/7 Loops


#1

Can anyone tell me waht is wrong with this code?

            var myPlaces = ['Hawaii', 'Tenerife', 'Grecee'];
            var friendPlaces = ['Hawaii', 'Tenerife', 'Italy'];

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

	for (var j = 0; j < friendPlaces.lenght; j++) {
	console.log(friendPlaces[j]);
           }
               }

The first array is working,but the second one does not and i don't find any mistakes.
Thanks


#2

@radurco, Notice the spelling. :slight_smile:

And the placement of your curly brackets { }

Remember to close the first for loop and delete the last }


#3

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