This code isn't letting me pass but the code looks right


#1


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


Error Message 'Make sure to change susan's age to 35!'


// 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 setAge = function (newAge) {
     this.age - newAge;
};
var susan = new Object();
susan.age = 25;
susan.setAge = setAge;
// here, update Susan's age to 35 using the method
susan.setAge(35);


#2

HI you have the setAge method twice just remove this one

// make susan here, and first give her an age of 25
var setAge = function (newAge) {
     this.age - newAge;
};

#3

All that I messed up on is that I used - instead of =.


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.