ES6 - Math.acos(x) Function


Advertisements


This function returns the inverse cosine of x.

Syntax

Math.acos(x)      

Parameter

  • X1 − represents a number

Example

console.log("---Math.acos()---") 
console.log("Math.acos(0): "+Math.acos(0)) 
console.log("Math.acos(Math.SQRT1_2): "+Math.acos(Math.SQRT1_2))          

Output

---Math.acos()--- 
Math.acos(0): 1.5707963267948966 
Math.acos(Math.SQRT1_2): 0.7853981633974483       

es6_math.htm

Advertisements
E-Books Store