JavaScript Math.cos()
JavaScript Math.cos()
The Math.cos() method is used to return the cosine of a number. It returns a value between 1 and -1.
Syntax:-
Its syntax is:- Math.cos(x)
Return:-
Its return is:- 1 to -1 and if not a valid number then NaN
Further Explanation:-
Parameter | Description |
---|---|
x | Required. A number. |