16/33 What is wrong with code? HELP


#1

/ 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;
susan.setAge = setAge;

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


#2

Hey @daisy578! Quick solution:

You dont need these lines of codes:

Hope this helped!


#3

@amanuel2 thank you! I tried your suggestion, but it didn't work


#11