For loops II help


#1

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]);
}

#2
var names =

The assignment operator is between variable and expression.


#3

thanks it worked :smile:


#4

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