Using Number.MAX_VALUE property to coding in Javascript/JS

This JavaScript tutorial explains how to use the Number property known as MAX_VALUE with syntax and examples.

Description

In JavaScript, MAX_VALUE is a static property of the Number object that is used to return the most numeric value that can be represented in JavaScript. Because MAX_VALUE is a property of the Number object, it ought to be invoked via the object called Number.

Syntax

In JavaScript, the syntax for the MAX_VALUE property is:

Number.MAX_VALUE;

Parameters or Arguments

There are no parameters or arguments for the MAX_VALUE property.

Returns

The MAX_VALUE property returns the maximum numeric value that can be represented in JavaScript which is 1.7976931348623157e+308.

Note

The MAX_VALUE property is a property of the Number object and not a wide variety function. However, we have blanketed the MAX_VALUE property within our JS Number Methods area because you will most in all likelihood use this property in conjunction with the Number methods located in this section.

Example

Let’s take a seem at an instance of how to use the MAX_VALUE property in JavaScript.

For example:

console.log(Number.MAX_VALUE);

In this example, we have invoked the MAX_VALUE property the use of the Number class.

We have written the output of the MAX_VALUE property to the internet browser console log, for demonstration purposes, to exhibit what the MAX_VALUE property returns.

The following will be output to the net browser console log:

1.7976931348623157e+308

In this example, the MAX_VALUE property back a cost of 1.7976931348623157e+308 which represents the greatest numeric value that can be represented in JavaScript.