27, i just cant see the problem


#1

// Our Person constructor
function Person (name, age) {
this.name = name;
this.age = age;
};

// Now we can make an array of people
var family = new Array();
family[0] = new Person("alice", 40);
family[1] = new Person("bob", 42);
family[2] = new Person("michelle", 8);
family[3] = new Person("timmy", 6);

// loop through our new array
for (var i = 0; i <= family.length, i++) {
console.log(family[i].name);
};

I get a syntax error saying 'unexpected: token )' but for the life of me i can't find it and my code looks like everyone elses i think :S what am i missing, thanks!


#2

Hi in your for loops after family.legnht, you have to put a ";" and also set it just less than "family.lenght" like that i < family.lenght so it should be like that
for (var i = 0; i < family.length; i++)