ฟังก์ชัน cosh() ของออบเจกต์ Math ยอมรับมุม (เป็นเรเดียน) และส่งกลับค่าไฮเปอร์โบลิกโคไซน์
ไวยากรณ์
ไวยากรณ์ของมันคือดังต่อไปนี้
Math.cosh(90)
ตัวอย่าง
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result = Math.cosh(90);
document.write("Hyperbolic cosine value of the given angle: "+result);
</script>
</body>
</html> ผลลัพธ์
Hyperbolic cosine value of the given angle: 6.102016471589204e+38