ES6 - Math.tan(x) Function
This function returns the tangent of x.
Syntax
Math.tan(x)
Parameter
X − represents a number
Example
console.log("---Math.tan()---")
console.log("Math.tan(Math.PI/4): "+Math.tan(Math.PI/4))
console.log("Math.tan(0): "+Math.tan(0))
Output
---Math.tan()--- Math.tan(Math.PI/4): 0.9999999999999999 Math.tan(0): 0
Advertisements