Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "use strict";
- module.exports = class Rectangle {
- constructor(x, y, width, height) {
- this.x = x;
- this.y = y;
- this.width = width;
- this.height = height;
- }
- get left() {
- return this.x;
- }
- get right() {
- return this.x + this.width;
- }
- get top() {
- return this.y;
- }
- get bottom() {
- return this.y + this.height;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement