The Math sqrt() static method returns the square root of a number.

    
    function calcHypotenuse(a, b) {
      return Math.sqrt(a * a + b * b);
    }

    console.log(calcHypotenuse(3, 4));
    // 5

    console.log(calcHypotenuse(5, 12));
    // 13

    console.log(calcHypotenuse(0, 0));
    // 0