JSFiddle - React, Tailwind, and code Playground
by Andrew Gerst
JavaScript
function Rectangle(w, h) {
this.width = w;
this.height = h;
}
Rectangle.prototype.area = function() {
return this.width * this.height;
};
var page = new Rectangle(8.5, 11);
var page2 = new Rectangle(12, 12);
alert(page.area());
alert(page2.area());