Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Math</h1>
<h2>The Math.cos() Method</h2>
<p>Math.cos() returns the cosine of an angel given in radians.</p>
<p id="demo"></p>
<script>
let x = Math.cos(3.14);
document.getElementById("demo").innerHTML = x.toFixed(2);
</script>
</body>
</html>