JavaScript math cos() method
The JavaScript math cos() method is used to get the cosine of a number. Syntax: Math.cos(n) Parameters n: It represents the number whose cosine has to be get. Returns Cosine of a number. Example: <!DOCTYPE html> <html> <body> <script> document.writeln(Math.cos(5)); </script> </body> </html>