Please help me out


#1

var names = ["alessia", "taylor", "jay", "leah", "cara"];

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


#2

the condition of your for loop:

i < names

this should be a number, names is an array, maybe use the length of the array instead? (names.length)


#3

@cssjumper21670, in your for loop you try compare number and object. So, @stetim94 is wright. Array is an Object, so it has properties and methods. You can find more info here: JavaScript Array Reference.


#4

ohh thank you soo much @stetim94


#5

thank you @denys.matsevych.30


#6