This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.

Smartphone icons created by Freepik - Flaticon

JS Math.cos()

Math.cos(x) returns the cosine of x (given in radians):

Angle in radians = (angle in degrees) * PI / 180.

document.getElementById("demo").innerHTML = 
"The cosine value of 0 degrees is " + Math.cos(0 * Math.PI / 180);