HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

JavaScript MAX_VALUE Property

Number Object Reference JavaScript Number Object

Example

Return the largest number possible in JavaScript.

Number.MAX_VALUE;

The result will be:

1.7976931348623157e+308

Try it yourself »

Sice MAX_VALUE is a property of the Number object wrapper, you always use it as Number.MAX_VALUE.

Using x.MAX_VALUE, where x a Number object you have created, will return undefined.


Definition and Usage

The MAX_VALUE property returns the largest number possible in JavaScript.

This static property has a value of 1.7976931348623157e+308.

Note: Numbers larger than MAX_VALUE are represented as infinity.


Always Use Number.MAX_VALUE

MAX_VALUE is a static property of the JavaScript Number object. You can ony use it as Number.MAX_VALUE.

Using x.MAX_VALUE, where x is a number or Number object, will return undefined:

Example

var x = 100;
x.MAX_VALUE;

The value of x will be:

undefined

Try it yourself »


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The MAX_VALUE property is supported in all major browsers.


Syntax

Number.MAX_VALUE

Technical Details

Return Value: A Number, 1.7976931348623157e+308
JavaScript Version: 1.1


Number Object Reference JavaScript Number Object

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE