Constructor
new Shape(options, shape)
Constructor of the class that receives two arguments.
Parameters:
Name | Type | Description |
---|---|---|
options |
Array | Width and length of the shape. |
shape |
String | Name of the shape. |
- Source:
Methods
getArea() → {Number}
Function that calculates the area of the shape that is specified in the constructor.
- Source:
Returns:
Returns the calculated value of the area.
- Type
- Number