Loop for Loop Range Error?


#1

This code did print out the name property as was the goal but I am very very lost on what went wrong here? Also can someone explain what Maximum call stack size exceeded means?

function Person ( name, age) {
this.age = age;
this.name = name;

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( i =0; i <4; i++){
console.log(family[i].name);
}

Oops, try again. When trying to create a new Person the following error was thrown: RangeError: Maximum call stack size exceeded


#2

well you didn't close your function Person properly in your example. Should be } before var family