12. Loops and Arrays II


#1

I can't see the error in my code. Please help!

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


#2

you need a 5th name, see:

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

hope this helps


#3

oh, thanks! can't believe I missed that!