Make your own metod


#1


I don not understand

Replace this line with your code. 

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;
};
rectangle.setWidth = function(newWidth){
  this.Width = newWidth;  
};
rectangle.setHeight = setHeight;
rectangle.setWidth =  setWidth;
// help by finishing this method

rectangle.setHeight(6);
rectangle.setWidth(8);


#2

Unclear what you want to know. Be specific, consider how your question will be received


#3

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