23 - TypeError


#1


https://www.codecademy.com/en/courses/spencer-sandbox/3/4?curriculum_id=506324b3a7dffd00020bf661#


TypeError: Cannot read property 'species' of undefined. Don't know what I'm doing wrong. Please help.


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);


#2

from the instructions:

Create a new object called sally

the hint is actually in the instructions, you need to create a new Person, you miss the new keyword


#3

Awesome, thanks for the help!


#4