27 what is wrong with my code!


#1

what did i do wrong

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

// 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

console.log( "oldest to youngest:" + family[0] + + family[1] + + family[2] + family[3] );


#2

the lesson tells you to use a for loops.. for printing all the family..


#3

oh thx that helped a lot