Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Rectangle = (function() {
- var constr,
- a,
- b;
- constr = function(a, b) {
- this.a = a;
- this.b = b;
- }
- constr.prototype = {
- getArea: function() {
- return this.a * this.b;
- },
- getPerimeter: function() {
- return 2 * (this.a + this.b);
- }
- }
- return constr;
- })();
Advertisement
Add Comment
Please, Sign In to add comment