Loops and arrays II (Please help)



Syntax error unexpected token

var names = ["Andree", "Katharine", "Steven", "Christian", "Mom"];

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


I keep getting a syntax error and cannot see what I am doing wrong for the life of me. Any help is appreciated.




In your for loop, should you separate your code with commas or semicolons?


Thank you biff75, so simple!


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