Calculate the area

Report a typo

Complete the missing parts in the object rectangle with properties length and width.

The method calculateArea should return the area of the rectangle. Then call this method and print the result.

Fill in the gaps with the relevant elements
let rectangle = {
   length: 5,
    width: 3,
    calculateArea() {
        return ;
    }
};

console.log(rectangle.); // 15

Create a free account to access the full topic