> For the complete documentation index, see [llms.txt](https://kkishan114.gitbook.io/10-days-of-javascript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kkishan114.gitbook.io/10-days-of-javascript/index/day-4-create-a-rectangle-object.md).

# Day 4: Create a Rectangle Object

### Problem Link <a href="#problem" id="problem"></a>

* [x] [**HackerRank Problem Link**](https://www.hackerrank.com/challenges/js10-objects/problem)

### Solution

* [x] **JS Solution**

{% code title="rectObject.js" %}

```javascript
this.length = a;
this.width = b;
this.perimeter = 2 * (a + b);
this.area = a * b;
```

{% endcode %}
