19. More kind of methods


square.calcArea = function() {
return this.sideLenth * this.sideLength;

Following error comes
Oops, try again.
** Your method failed when sideLength was 0 where it returned NaN instead of 0**


HI can you post all your code?
then here

return this.sideLenth * this.sideLength;

you wrote this.sideLenth intsead of this.sideLength to the first one.


thankyou changing Lenth to Length worked. a silly mistake


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