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

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!