12. loops and arrays II - Code not printing


#1



I don't know why this isn't working, the code looks fine to me.

https://www.codecademy.com/courses/javascript-beginner-en-NhsaT/2/4?curriculum_id=506324b3a7dffd00020bf661#

This is the error message I got:
Oops, try again. Your code should have printed 'I know someone called antoinette', 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!

This is my code:

var names = ["antoinette", "jeffery", "charlotte", "lucy", "jonathan"];

for (var i = 0; i > names.length; i ++)
{
    console.log("I know someone called " + names[i])
}

Please help!!!


#2

Hey there! A very small error in our for-loop syntax. A small hint: ' > '


#3

Thanks for that it worked!


#4

I'm happy to here that!


#5

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