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