JavaScript Algorithm: Maximum Edge of a Triangle

Photo by Pawel Czerwinski on Unsplash

Today, we write a function called nextSide that will accept two arguments, side1 and side2, as integers.

You are given the lengths of two sides of a triangle. Assuming that the side lengths are all positive integers, the goal of the function is to output…

--

--

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