Where is the error?


#1

function Person(name,age) {
this.name = name;
this.age = age;
this.species = "Homo Sapiens";
}

var sally = Person("Sally Bowles", 39);
var holden = Person("Holden Caulfield", 16);
console.log("sally's species is " + sally.species + " and she is " + sally.age);
console.log("holden's species is " + holden.species + " and he is " + holden.age);

is show this error:
TypeError: Cannot read property 'species' of undefined


#2

This needs to be var sally = new Person

Same for Holden they both need new before Person.


#3

I was blind. Thanks.