12. Loop and Arrays II


#1


I am stuck on the "Loop and Arrays II' exercise.


Apparently there is some sort of syntax error that I cannot spot for the life of me.
"Oops, try again. There was a problem with your syntax."


var names = ["John"; "Smith"; "Cena"; "Mohammod"; "James"];
for (var i = 0; i < names.length; i++){
    console.log("I know someone called " + names[i]);
}


#2

You use commas to separate list items, not semicolons.


#3

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