Getting " Your method failed when sideLength was 0 where it returned NaN instead of 0"


#1

var square = new Object();
square.sideLength = 6;
square.calcPerimeter = function() {
return this.sideLength * 4;
};
// help us define an area method here
square.calcArea = function() {
return this.sidelength * this.sidelength;
};

var p = square.calcPerimeter();
var a = square.calcArea();


#2

Your variable name for the square's side length is not "sidelength"! It's "sideLength"! Change the line return this.sidelength * this.sidelength; to the correct variable name and you should be able to move onto the next lesson! :slightly_smiling: