Javascript - Number MAX_VALUE Property

The MAX_VALUE property returns the largest number possible in JavaScript.

Description

The MAX_VALUE property returns the largest number possible in JavaScript.

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

Numbers larger than MAX_VALUE are represented as infinity.

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

Syntax

Number.MAX_VALUE

Return

A Number, 1.7976931348623157e+308

Example

Return the largest number possible in JavaScript.

Demo

console.log(Number.MAX_VALUE);

//Using x.MAX_VALUE, where x is a number or a Number object, will return undefined:
var x = 100;//from w ww  .j av  a  2  s .c o  m
console.log(x.MAX_VALUE);

Result