Number

Description

Wraps a numeric value.

Static Properties

MAX_VALUE readonly A constant representing the largest representable number.
MIN_VALUE readonly A constant representing the smallest representable number.
NEGATIVE_INFINITY readonly A constant representing negative infinity.
NaN readonly A constant representing the special “Not a Number” value.
POSITIVE_INFINITY readonly A constant representing positive infinity.

Constructors

Number readonly Returns a new Number object set to the value of the argument converted to a number.

Methods

toExponential readonly Converts the Number object to a string in scientific notation.
toFixed readonly Converts the Number object to a string with fixed decimals.
toLocaleString readonly Returns the value of a Number object converted to a string, using localized conventions.
toPrecision readonly Converts the Number object to a string in either scientific or fixed notation, epending on its value.
toSource readonly Creates a string representation of this object that can be fed back to?eval()?to re-create an object. Works only with built-in classes.
toString readonly Returns the value of a Number object converted to a string.
valueOf readonly Returns the value of a Number object as a primitive number.