17. "This" Works for Everyone



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;


Hi this line

add. susan.setAge=setAge;

you should remove the add.


Wow that was simple thanks :grin: