I can't figure out what I'm doing wrong with 12!


#1

Here is the code that I have for number 12:

var names = ["Steve", "Tim", "Barbara", "Clint", "Kamala"];

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

Every single time I press submit, instead of giving me one name on a line it gives me all the names 5 times.

I can't figure out what I'm doing wrong here.


#2

Now you're printing the whole array "names" 5 times. Use the index to print only one name. Use names[i] instead of names here:


#3

That did it, thank you!