Javascript Acos() Function

The acos() method of math object returns arccosine of a number. Use it for example to get arccosine of a number.

Syntax

Math.acos(num)

Javascript Acos() Function Example

<html>
<head>
<script type="text/javascript">
var num = .2;
document.write(Math.acos(num) + "<br/>");
document.write(Math.acos(-2) + "<br/>");  
document.write(Math.acos(-1) + "<br/>");  
document.write(Math.acos(0) + "<br/>");  
</script>
</head>
<body>
</body>
</html>