12/13 Syntax error: Unexpected token [


#1

var names ["Alice", "Jess", "Teggun", "Milly"];

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


#2

We need to make an assignment from right to left using the = operator:

var names = ["Alice", "Jess", "Teggun", "Milly"];

The declared variable refers to the anonymous array, known as a reference object. names is the reference to the array, as a whole, and names[0] .. names[3] are the index references.


#3

Also no semicolon after the for loop otherwise it will confuse the
semicolon with the function body. Meaning it will not loop over the
stuff in {} but just do nothing while counting up, as the semicolon
means /*do nothign -> statement-end-sign*/;