Where are the bugs?


#1


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 2 * height + 2 * width;
};
var rex = new Rectangle(7,3);
var area = rex.calcArea();
var perimeter = rex.calcPerimeter();


#2

Move that closing brace to below the other one under the last method.


#3

Okay I'll try that.............. thanks it worked!


#4

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