27. Loop the loop


#1

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

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);

for (var i=0; i< family.length; i++); {
console.log (family[i].name);
}

The error message:
Oops, try again. Make sure to log to the console the name of each object

Can anyone lend some help pls?


#2

Hi this part you should remove the `;

for (var i=0; i< family.length; i++); <== this one

#3

Thank you so so much for spotting that out.. I've been going thru it over and over..
Thanks once again wizmarco !