Number.MAX_VALUE represents the biggest possible numeric value of a positive number that can be represented in JavaScript. It is the maximum possible positive number representable in JavaScript within float precision. The values greater than Max_VALUE are represented as infinity.
Syntax:
Number.MAX_VALUE
Return Value: It possesses the value of the biggest positive number which is approximately 1.79E+308, or 1.7976931348623157 * (10^308).
Note: As MAX_VALUE is a static property of the Number class, we should always use it as Number.MAX_VALUE instead of using as a property of the object created from the Number class ( static properties always belong to the class, not to the objects). So, if we create a Number object and try to access the MAX_VALUE property of the object, it will return undefined.
If we take the negative of the Number.MAX_VALUE, will represent the minimum possible negative number in JavaScript as the value of the negative number will be maximum making it the minimum possible negative number.
Example 1: This example shows the use of the MAX_VALUE property.
Javascript
let num=100; console.log(num.MAX_VALUE); console.log(Number.MAX_VALUE); |
Output:
undefined VM646:3 1.7976931348623157e+308
Example 2: This example shows the use of the MAX_VALUE property.
Javascript
let num=100; console.log(num.MAX_VALUE); |
Output:
undefined
We have a complete list of Javascript Number methods, to check those please go through the JavaScript Number Complete Reference article.
Supported Browsers:
- Chrome 1 and above
- Edge 12 and above
- Firefox 1 and above
- Internet Explorer 4 and above
- Opera 3 and above
- Safari 1 and above
We have a complete list of JavaScript Number constructor, properties, and methods list, to know more about the numbers please go through that article.