The JavaScript number object enables you to represent a numeric value. It may be integer or floating-point. JavaScript number object follows IEEE standard to represent the floating-point numbers.
By the help of Number() constructor, you can create number object in JavaScript. For example:
If value can't be converted to number, it returns NaN(Not a Number) that can be checked by isNaN() method.
You can direct assign a number to a variable also. For example:
Output:
102 102.7 130000 16
Let's see the list of JavaScript number constants with description.
| Constant | Description |
|---|---|
| MIN_VALUE | returns the largest minimum value. |
| MAX_VALUE | returns the largest maximum value. |
| POSITIVE_INFINITY | returns positive infinity, overflow value. |
| NEGATIVE_INFINITY | returns negative infinity, overflow value. |
| NaN | represents "Not a Number" value. |
Let's see the list of JavaScript number methods with their description.
| Methods | Description |
|---|---|
| isFinite() | It determines whether the given value is a finite number. |
| isInteger() | It determines whether the given value is an integer. |
| parseFloat() | It converts the given string into a floating point number. |
| parseInt() | It converts the given string into an integer number. |
| toExponential() | It returns the string that represents exponential notation of the given number. |
| toFixed() | It returns the string that represents a number with exact digits after a decimal point. |
| toPrecision() | It returns the string representing a number of specified precision. |
| toString() | It returns the given number in the form of string. |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India