Intro to for loops II ughhhh


var names = ["Bob", "Joe", "Nick", "Sam", "Dan"]
for (i = 0; i > 4; i++) {
console.log("I know someone called " + names[i] + ".")


The loop has an incorrect conditional. It should be less than (<)

    for (var i = 0; i < names.length; i++) {

If you are still getting an error message, remove + "." from the output. It is not asked for.


Oops, try again. Your code should have printed 'I know someone called Bob', 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!
thanks, I fixed it so it does thing right, but it give the error above


never mind. sorry. :frowning: