12 loops/arrays


So very confused here, I keep getting the error message but have no idea why

Oops, try again. Your code should have printed 'I know someone called caleb', but didn't. Make sure to type the 'I know someone called ' part exactly right, and don't forget the space between that phrase and the name!

var names = ['mike','caleb','aubrey','sarah','luxy'];
for (var i = 0; i > names.length; i++){
console.log("I know someone called " + names[i]);


i > names.length

should be

i < names.length


lol, yeah I just figured that out, thanks!


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