The Math atan() static method returns the inverse tangent (in radians) of a number.

    
    // Calculates angle of a right-angle triangle in radians
    function calcAngle(opposite, adjacent) {
      return Math.atan(opposite / adjacent);
    }

    console.log(calcAngle(8, 10));
    // 0.6747409422235527