What's wrong with my code?


#1


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


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



// here, update Susan's age to 35 using the method
susan.setAge = setAge;
setAge = susan.setAge(35);


The console tell me to 'Make sure to set susan's setAge property to be the setAge function' but I can't find any error in my code. Please help me to solve this.


#2

here:

setAge = susan.setAge(35);

why setAge =? It will overwrite the function.


#3

Thanks, I solved the problem by removing setAge


#4