I think this should be right Loops and Arrays II


#1

var names = ["Meena","Kai","Aidyn","Jake","Nora"];

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

It keeps telling me that there is an unexpected token ) but I've checked and I think it should be correct...


#2

@19ka01,

Syntax

for ([initialization]; [condition]; [final-expression]) {
  statement
}

#3

use " ; " after each condition within for loop

ex:-for (var i = 0; i < names.length; i++)
{

}