The cos() function returns the cosine of a number.
|x||Required. A number|
Note: The cos() function returns a numeric value between -1 and 1, which represents the cosine of the angle.
In the following example we will return the cosine of different numbers:
The output of the code above will be:
Your message has been sent to W3Schools.