Loops and arrays II - Introduction to 'For' Loops in JS


Hey guys again, im having a small issue and i would like to be explained what im doing wrong here! Because i know my code is right, and i understand the loops!
My code:
var names ["Oskar", "Mads", "Bunnom", "Martin", "Piidom"];

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

Error: Oops, try again. There was a problem with your syntax.
SyntaxError: Unexpected token [

Explain me what am i doing wrong?


var names ["Oskar", "Mads", "Bunnom", "Martin", "Piidom"];

your missing a = here.


Oh sh*t i forgot thanks a lot haxor! :smiley:


where the a ? i dont understand


not the a. he said "="