# Javascript program to enter the length and breadth of a rectangle and find its area

ADVERTISEMENTS

Javascript program to enter the length and breadth of a rectangle and find its area. There are you will learn how to find the area of a rectangle in javascript language.

**Formula:**

*a = l * w*

**where:**

`a`

= area of rectangle

`l`

= length of the rectangle

`w`

= width of the rectangle

Let us understand this through Javascript program:

```
<script type="text/javascript">
/*
Javascript program to find the area of a rectangle
*/
var l, w, a;
l = 8;
w = 6;
/* Calculate area of rectangle */
a = l * w;
document.write("Area of rectangle = " + a + " units");
</script>
```

**Output Screen:**

Area of rectangle = 48 units