JavaScript math acos() method

The JavaScript math acos() method is used to get the arccosine of a number in radians.

Syntax:

Math.acos(n)

Parameters
n: It represents the number whose arccosine has to be get.

Returns
Arccosine of a number.

Example:

<!DOCTYPE html>
<html>
<body>
<script>
document.writeln(Math.acos(1));
</script>
</body>
</html>