Why this?


Oops, try again. When the computer tried to call calcPerimeter of a Rectangle object, the following error was thrown: TypeError: rec_test.calcPerimeter is not a function

function Rectangle(height, width) {
this.height = height;
this.width = width;
this.calcArea = function() {
return this.height * this.width;
// put our perimeter function here!
return (this.height + this.width)*2 ;
var rex = new Rectangle(7,3);
var area = rex.calcArea();
var perimeter = rex.calcPerimeter();
console.log(area, perimeter, rexHeight, rexWidth);


... that's because you called your method 'calacPerimeter' and not 'calcPerimeter' -_-


hahaha thanks a lot i just admired it for a whole hour and never find the issue .
thank u batman