Given the following a rectangle
object like the one below, write the following functions which accept a rectangle
object as an argument:
- isSquare - Returns whether the rectangle is a square or not
- area - Returns the area of the rectangle
- perimeter - Returns the perimeter of the rectangle
const rectangleA = {
length: 4,
width: 4
};
Given the following a triangle
object like the one below, write the following functions which accept a triangle
object as an argument:
- isEquilateral - Returns whether the triangle is equilateral or not
- isIsosceles - Returns whether the triangle is isosceles or not
- area - Returns the area of the Triangle
- isObtuse - Returns whether the triangle is obtuse or not
const triangleA = {
sideA: 3,
sideB: 4,
sideC: 4
};