Math ऑब्जेक्ट का cos() फंक्शन एक कोण (रेडियंस में) स्वीकार करता है और उसका कोसाइन मान लौटाता है।
सिंटैक्स
इसका सिंटैक्स निम्नानुसार है:
Math.cos(x)
उदाहरण
<html> <head> <title>JavaScript Example</title> </head> <body> <script type="text/javascript"> var result = Math.cos(90); document.write("cosine value of the given angle: "+result); </script> </body> </html>
आउटपुट
cosine value of the given angle: -0.4480736161291702