24 Constructors with Methods


#1

PLEASE HELP!

function Rectangle(height, width) {
  this.height = height;
  this.width = width;
  this.calcArea = function() {
      return this.height * this.width;
  };
  // put our perimeter function here!
  this.calcPerimeter = function() {
      return (this.height * 2) + (this.width *2);
};

var rex = new Rectangle(7,3);
var area = rex.calcArea();
var perimeter = rex.calcPerimeter();

Don't know what to do next!


#2

your function:

function Rectangle(height, width) {

the { of your function has no matching closing curly bracket


#3

Thank you! Didn't notice that at all!


#4