16/33


#1

I don't understand why it doesn't work. Help me!
Je ne comprends pas pourquoi cela ne marche pas. Aidez-moi!
// 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;
// and down here we just use the method we already made
bob.setAge = setAge;

// change bob's age to 50 here
bob.setAge = (50);


#2

We need to pass 50 in to the method:

bob.setAge(50);