Need help on spencer sandbox 3.4 22/33 help halp halps


#1


Not sure why this error is popping up, using chrome, did a reset, etc...please help I want to scream


https://www.codecademy.com/en/courses/spencer-sandbox/3/4


ReferenceError: age is not defined


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

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


#2

if you want sally's age, you can do sally.age

you created an object:

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

then you created an instance of the object:

var sally = new Person("Sally Bowles", 39);

so now you can access the 3 property's of sally by doing: sally.species, sally.nameandsally.age`, i am confused why you do it right for the species, but wrong for the age. But i hope you understand now


#3

got it thanks thank you


#4