Loops and arrays II


#1

Heeelp please

var names = ["Paul", "John", "Kenny", "Paul again", "And that one nobody likes")
for(var i = 0; i < names.length; i++) {
console.log("I know someone called" + names[i])
};

Oops, try again. There was a problem with your syntax.


#2

You forgot ending semicolons.


#3

I've been on this section for a while can anyone see where my mistake is?
var names=["Ayan", "Nick", "Justin", "Steve", "Tom"];

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

error msg says Oops, try again. Your code should have printed 'I know someone called Ayan', but didn't. Make sure to type the 'I know someone called ' part exactly right, and don't forget the space between that phrase and the name!


#4

// Click on "Stuck? Get a hint!" if you get stuck!
var names=["Dilip","Kumar","Rajni","Veer","Kumar"];
for(i=0;i{
console.log("I know someone called " +names[i]);
}