The Number object represents the date in the form of a numeric value, or an integer or floating-point number. Generally, you don't need to worry about Number objects because the browser automatically converts number literals to illustrate the number classes.
Syntax to create a Number object as follows:
var val = new Number ( number );
In the position of number, if you provide any non-numeric value, then the parameter cannot be converted to a number, it returns NaN (short for Not-a-Number).
The properties of Number
Below is a list of its attributes and descriptions.Properties Description
NaNEquivalent to value that is not a number
NEGATIVE_INFINITYA value less than MIN_VALUE
POSITIVE_INFINITYA value greater than MAX_VALUE
prototypeStatic attribute of Number object. Use the prototype property to assign new properties and methods to the Number object in the current document
constructorReturns the function that creates the illustration of this object. By default, it is the Number object
The methods of Number
The Number object contains only the default methods that are part of each object definition.Method Description
toFixed ()A number format with a specific number of digits to the right of the decimal part.
toLocaleString ()Returns a string value version of the current number in a format that can be varied according to the browser internal setting.
toPrecision ()Define how many digits (including the digits on the right and left of the decimal part) to display a number.
toString ()Returns the string representation of the numeric value.
valueOf ()Returns the value of the number.
According to Tutorialspoint