13.) Make sure to set rectangle's width to 8!


#1

So the error message I keep getting is that make sure your width is equal to 8! However, I have it as eight and I cannot see what the problem is with that....


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 = function (newWidth) {
  this.widith = newWidth;
};
// here change the width to 8 and height to 6 using our new methods
rectangle.setHeight(6);
rectangle.setWidth(8);


#2

Check your spelling here :slight_smile:


#3

Oh my word... Bahahaha thanks! Apparently I need to code some spell check into my lessons xD


#4

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