12 Help needed


#1

Hello,

my code looks like this:

var names ["Irmi", "Willi", "Volkmar", "Christopher", "Nadine"];

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

Still i get this error "SyntaxError: missing before statement" and can't figure out my mistake.

Thank you in advance!


#2

@el_harr,
You forgot to use the so-called assignment-operator

var names = ["Irmi", "Willi", "Volkmar", "Christopher", "Nadine"];

#3

Thank you very much, this helped!