10 Days of JavaScript Day 4: Rectangle Object & Classes

Featured image

Day 4 of 10 Days of JavaScript challenge on Hackerrank is Create a Rectangle Object & Classes and Count Objects.

In this series, I will be sharing my solutions to the challenges.

Day 4: Create a Rectangle Object

Function has two parameters: a and b. It must return an object modeling a rectangle that has the following properties:

Input Format

Day 4: Classes

Create a Polygon class that has the following properties:

Day 4: Count Objects

getCount has the following parameter: