Home
<!DOCTYPE html> <html> <body> <h1>Demo: JavaScript Number Properties</h1> <p id="p1">Number.MAX_VALUE = </p> <p id="p2">Number.MIN_VALUE = </p> <p id="p3">Number.NEGATIVE_INFINITY = </p> <p id="p4">Number.POSITIVE_INFINITY = </p> <p id="p5">Number.NaN = </p> <script> var maxval = Number.MAX_VALUE; var minval = Number.MIN_VALUE; var negval = Number.NEGATIVE_INFINITY; var posval = Number.POSITIVE_INFINITY; var nanval = Number.NaN; document.getElementById("p1").textContent += maxval; document.getElementById("p2").textContent += minval; document.getElementById("p3").textContent += negval; document.getElementById("p4").textContent += posval; document.getElementById("p5").textContent += nanval; </script> </body> </html>
Result: