17. "This" Works for Everyone


#1



https://www.codecademy.com/courses/spencer-sandbox/2/5?curriculum_id=506324b3a7dffd00020bf661


Hi thanks for the help
It keeps saying Oops, try again. It looks like you have an error in your code. Here's the message: ReferenceError: add is not defined
What does it mean and what do I do i'm so lost


// here we define our method using "this", before we even introduce bob
var setAge = function (newAge) {
this.age = newAge;
};
// now we make bob
var bob = new Object();
bob.age = 30;
bob.setAge = setAge;

// make susan here, and first give her an age of 25

var susan = new Object();
susan.age = 25;
add. susan.setAge=setAge;
susan.setAge(35);


#2

Hi this line

add. susan.setAge=setAge;

you should remove the add.


#3

Wow that was simple thanks :grin: