A library for rectangles.
npm install rect
Rect takes four arguments x, y, width, and height.
x
y
width
height
It also has two methods:
- perimeter(): returns the perimeter of the rectangle- area(): returns the area of the rectangle
perimeter()
area()