The Math acos() static method returns the inverse cosine (in radians) of a number.
// Calculates angle of a right-angle triangle in radians
function calcAngle(adjacent, hypotenuse) {
return Math.acos(adjacent / hypotenuse);
}
const calcAngle = calcAngle(8, 10));
console.log(calcAngle);
// 0.6435011087932843