It looks like the object at index 0 was not created with the Person constructor


#1
var Person = function(name, age) {
    this.name = name;
    this.age = age;
};

var familly = [];

familly[0] = new Person("alice", 40);
familly[1] = new Person("bob", 42);
familly[2] = new Person("michelle", 8);
familly[3] = new Person("timmy", 6);

for(var i = 0; i < familly.length; i++) {
    console.log(familly[i].name);
};

Hello, above is my code and I get this error message:
> Oops, try again. It looks like the object at index 0 was not created with the Person constructor.
I checked multiple times so I don't find out where I am missing something.

Any help ?


#2

only one l in family? Maybe the test function looks at family but your code uses familly. The rest seems to be ok.


#3

(x_x) I cannot believe I checked my syntax many times and it was just a misspelling error...

Thanks