For loops II help


it says SyntaxError: Unexpected token '='. Expected a parameter pattern or a ')' in parameter list.

var = names ["John", "Jane", "Jack", "Jill", "Jonathan"] 
for (var i=0; i < names.length; i++) {
    console.log("I know someone called" + " " + names[i]);

var names =

The assignment operator is between variable and expression.


thanks it worked :smile:


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