JavaScript has a built-in function to calculate the hypotenuse "Math.hypot()". For more information about this function you can visit MDN Math.hypot().