Question: Create a JavaScript that will display a polygon base on the given n-side . Then, the given n-sided regular polygon n, return the total sum

Create a JavaScript that will display a polygon base on the given n-side. Then, the given n-sided regular polygon n, return the total sum of internal angles (in degrees), display the polygon base on the given n-side, identify the polygon type.

Examples

sumPolygon(3) 180

sumPolygon(4) 360

sumPolygon(6) 720

Notes

n will always be greater than 2.

The formula (n - 2) x 180 gives the sum of all the measures of the angles of an n-sided polygon.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!