Lesson 27


#1

can't find error,
// Our Person constructor
function person(name, age) {
this.name = name;
this.age = age;
};

var family = new Array();
// Now we can make an array of people
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 < 4; i++) {
console.log(family[i].name);
}

getting error:
When trying to create a new Person a ReferenceError was thrown. Make sure you properly created the Person constructor. Here's the message: ReferenceError: Person is not defined

can not find the error


#2

person should be capitalized.