Make Your Own Method


var rectangle = {
height: 3,
width: 4

function setHeight (newHeight) {
rectangle.height = newHeight;


function setWidth (newWidth) {
rectangle.width = newWidth;


<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Says —> " Make sure to finish setWidth and make it a working function!"

I don’t understand what’s wrong here, new values were assigned accordingly, what else needs to be done?


Replace this line with your code.

<do not remove the three backticks above>


setWidth should be a method of rectangle object, not a function.

functions can’t access this


Done now, thank you.