JavaScript Algorithm: Sum of Polygon Angles

Photo by George Pagan III on Unsplash

Today, we write a function called sumPolygon that will accept one integer, n, as an argument.

You are given an n-sided regular polygon. The goal of the function is to calculate and return the total sum of internal angles. We are not going to go into mathematical detail on finding…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Erica N

Erica N

An illustrator that writes humor and satire about everything and nothing at the same time. Like my stories? Leave a tip at: https://ko-fi.com/ofcuriousbirds