Number.NEGATIVE_INFINITY เป็นค่าตัวเลขพิเศษที่แสดงค่าที่น้อยกว่า Number.MIN_VALUE ค่านี้แสดงเป็น "-Infinity" คล้ายกับอนันต์ในพฤติกรรมทางคณิตศาสตร์
ตัวอย่าง
คุณสามารถลองใช้โค้ดต่อไปนี้เพื่อเรียนรู้วิธีทำงานกับค่าคงที่ Number.NEGATIVE_INFINITY -
<html>
<head>
<script>
<!--
function showValue() {
var smallNumber = (-Number.MAX_VALUE) * 2
if (smallNumber == Number.NEGATIVE_INFINITY) {
alert("Value of smallNumber : " + smallNumber );
}
}
//-->
</script>
</head>
<body>
<p>Click the following to see the result:</p>
<form>
<input type="button" value="Click Me" onclick="showValue();" />
</form>
</body>
</html>