Rectangle
by mtambulut
JavaScript
class Rectangle{
constructor(height, width) {
this.height = height;
this.width = width;
}
calculateArea(){
return this.height * this.width;
}
}
let result = new Rectangle(10,20);
document.write(result.calculateArea());