Open In App

JavaScript Number MAX_VALUE & MIN_VALUE Property

JavaScript Number.MAX_VALUE and Number.MIN_VALUE is used to represent maximum and minimum numeric values in javascript. 

Syntax:



Number.MAX_VALUE 
Number.MIN_VALUE 

Return Type: Both Number.MAX_VALUE and Number.MIN_VALUE returns a numeric value.

Example 1: In this example, we will print the maximum value






function GFGFun() {
    // Undefined Behaviour
    let res = Number.MAX_VALUE;
    console.log(res);
}
GFGFun();

Output : 

1.7976931348623157e+308

Example 2: In this example, we will print the minimum value




function GFGFun() {
    // Undefined Behaviour
    let res = Number.MIN_VALUE;
    console.log(res);
}
GFGFun();

Output:

5e-324

Supported Browsers:

We have a complete list of JavaScript Number constructor, properties, and methods list, to know more about the numbers please go through that article.

Article Tags :