Class: Square

Square

Class that represents a square. Inherits from Shape.

Constructor

new Square(options)

Constructor of the square class. Call the super method of the parent class.
Parameters:
Name Type Description
options Hash Width and length of the shape.
Source:

Methods

area() → {Number}

Function that calculates the square area.
Source:
Returns:
Returns the calculated value of the area.
Type
Number