This is how you make the array of families:
// Now we can make an array of people var family = new Array(); `family = new Person("alice", 40);` family = new Person("bob", 42); family = new Person("michelle", 8); // add the last family member, "timmy", who is 6 years old family = new Person("timmy" , 6);
Why would my code not work? I made a family array and I put the elements in a different way.
I think i see the mistake. The for loop maximum is i<=family.length. The array needs to have a maximum of family.length - 1 because it array starts in index 0