MAX_VALUE  Number  class propertyS2C Home
      « Globals « Number « MAX_VALUE
Description
The maximum positive number value that can be represented in JavaScript.
- Like all class properties MAX_VALUEshould be used on the class rather than an instance of the class.
Syntax
| Signature | Description | 
|---|---|
| Number.MAX_VALUE | The maximum positive number value that can be represented in JavaScript. | 
Parameters
None.
Examples
The code below displays some MAX_VALUE usages.
var maxValue = new Array(4);
maxValue[0] = Number.MAX_VALUE;
maxValue[1] = Number.MAX_VALUE * -1;
if (Number.MAX_VALUE >= Infinity) {
  maxValue[2] = 'Number.MAX_VALUE >= Infinity';
} else {
  maxValue[2] = 'Number.MAX_VALUE < Infinity';
}
if ((Number.MAX_VALUE * -1) <= -Infinity) {
  maxValue[3] = '(Number.MAX_VALUE  * -1) <= -Infinity';
} else {
  maxValue[3] = '(Number.MAX_VALUE  * -1) > -Infinity';
}
alert(maxValue);
Related Tutorials
JavaScript Advanced Tutorials - Lesson 3 - Number
 
  
  
  
 Homepage
 Homepage Top
 Top