Question: Write a JavaScript function called getHypotenuse that returns the length of the hypotenuse of a right triangle given the length of the other two sides.
Write a JavaScript function called getHypotenuse that returns the length of the hypotenuse of a right triangle given the length of the other two sides. You can utilize the Pythagorean Theorem. Test your function with the following data.
getHypotenuse(3, 4) should return 5
getHypotenuse(6, 8) should return 10
Rewrite the above function as an arrow function.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
