Value range
Number.MIN_VALUE represents the smallest value in JavaScript. Number.MAX_VALUE stores the largest number. Number.NEGATIVE_INFINITY is the negative infinity. Number.POSITIVE_INFINITY is the positive infinity.
isFinite() function determines if a value is finite. This function returns true if the argument is between the minimum and the maximum values:
<!DOCTYPE html>
<html>
<head>
<title>Number Example</title>
<script type="text/javascript">
var result = Number.MAX_VALUE + Number.MAX_VALUE;
document.writeln(isFinite(result));
</script>
</head>
<body>
</body>
</html>
Home
JavaScript Book
Language Basics
JavaScript Book
Language Basics
Data Types:
- JavaScript Data Types
- typeof Operator
- The Undefined Type
- null Type
- null vs undefined
- Boolean Type
- Boolean() casting function
- The Literials of Number Type
- Octal Integer
- Hexadecimal
- Floating-Point Values
- Value range
- NaN
- Number Conversions:Number(), parseInt() and parseFloat()
- Number() function
- parseInt()
- parseFloat()
- The String Type
- String Literals and Escapes
- Get the String Length
- Converting to a String with toString() method
- Convert Number to String with radix
- Convert to String with String() casting function