18.Make your own method || Where is my Error?


#1



https://www.codecademy.com/pt/courses/spencer-sandbox/2/6?curriculum_id=506324b3a7dffd00020bf661#


Every time I try to submit the code it says:
Make sure to set rectangle's width to 8!
What i'm doing wrong? Please help me

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


#2

Hi this line

this.whidth = newWidth;

you wrote this.whidth instead of this.width


#3

It works! Thanks for solving my problem