Keep getting error message for lesson 19/33


var square = new Object();
square.sideLength = 6;

// define perimeter method
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();

I keep getting this error message "Oops, try again. Your method failed when sideLength was 0 where it returned NaN instead of 0"

Am pulling my hair out trying to figure this out, any help appreciated :grin:


Hi @courserunner19286

You have to change "sidelength" to "sideLength" (line 10)

Hold on :wink: