// 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 = new Person("alice",40);
family = new Person("bob",42);
family = new Person("michelle",8);
family = new Person("timmy",6);
// loop through our new array
for (var i=0; i < family.length; i++);
I keep getting this error message:
We're running a test below to make sure your code works.
TypeError: Cannot read property 'name' of undefined
not sure what is wrong?