Rectagnle


#1

What's wrong now?

here's my error message

ReferenceError: newWidth is not defined

and

Oops, try again. It looks like you have an error in your code. Here's the message: ReferenceError: newWidth is not defined


What's wrong with my syntax?
#2

rectangle.setWidth = function(newWidth)....


#3

Your parameter for setWidth function doesn't match with the one you're assigning to this.width. You forgot to use the camel-case.
rectangle.setWidth = function(newWidth){
this.width = newWidth;
};


#4

what is camel-case again? I forget that... :confused:


#5

I switched the rectangle at the end of the code and it passed.


#6

You can know about camel case here.


#7

ok like how in Javascript you would type setWidth?


#8

4 posts were split to a new topic: Sally and Holden problem


#11

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