ฟังก์ชันของอ็อบเจกต์ Math จะส่งกลับค่าของ e x – 1 โดยที่ x และ e เป็นฐานและเลขชี้กำลังของอัลกอริทึมธรรมชาติ
ไวยากรณ์
ไวยากรณ์ของมันคือดังต่อไปนี้
Math.expm1(6);
ตัวอย่าง
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var result = Math.expm1(6);
document.write("Result: "+result);
</script>
</body>
</html> ผลลัพธ์
Result: 402.4287934927351