Make Your Own Method


`var rectangle = new Object();
rectangle.height = 3;
rectangle.width = 4;
// here is our method to set the height
rectangle.setHeight = function (newHeight) {
this.height = newHeight;
// help by finishing this method
rectangle.setWidth =

// here change the width to 8 and height to 6 using our new methods`

I dont know what to do

Finish the method setWidth. It should take a parameter newWidth. It will change the property width to the given parameter.

Then use the two methods setHeight and setWidth to change rectangle's height to 6 and width to 8.

@amanuel2 @albionsrefuge @ionatan


Never mind i fixed it myself