Your post in “Thereb is no error but how can take off the method name( setAge: [Function] ) which is been displayed on the screen..?


#1

// here we define our method using "this", before we even introduce bob
var setAge = function (newAge) {
this.age = newAge;
return
};
// now we make bob
var bob = new Object();
bob.name = "Bob Smith";
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)
console.log(bob);


#2

Hey @thanveer_malik! I couldnt find the exact task so i may be wrong. Please next time post the task number. Anways your problem is here:

Your not suppose to have the return statement. Delete that and you should be good!