12/13 everything has gone wrong heeellpppp


#1

I'm pretty sure my code is correct...

var names = ["Harry", "Liam", "Niall", "Zayn", "Louis"];

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

and I don't understand why this is my error message is...

Oops, try again. Your code should have printed 'I know someone called Liam', 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!

I'm going insane, please help.


#2

OK never mind I've realised my mistake. I wrote...

console.log("I know someone called " + names[0]);

but I was meant to write

console.log("I know someone called " + names[i]);