Number
Last updated
Last updated
Number values represent floating-point numbers.
For more information see: Number (MDN).
Type | Name | Summary |
---|---|---|
Type | Name | Summary |
---|---|---|
The largest representable number.
Type Number
Sample
The smallest representable number.
Type Number
Sample
Special value representing negative infinity; returned on overflow.
Type Number
Sample
Special "not a number" value.
Type Object
Sample
Special value representing infinity; returned on overflow.
Type Number
Sample
Returns a string representing the number in exponential notation.
Returns: String A string representing the number in exponential notation.
Sample
Returns a string representing the number in exponential notation.
Parameters
Number fractionDigits An integer specifying the number of digits after the decimal point. Defaults to as many digits as necessary to specify the number.
Returns: String A string representing the number in exponential notation.
Sample
Returns a string representing the number in fixed-point notation.
Returns: String A string representing the number in fixed-point notation.
Sample
Returns a string representing the number in fixed-point notation.
Parameters
Number digits The number of digits to appear after the decimal point. Defaults to 0.
Returns: String A string representing the number in fixed-point notation.
Sample
Converts the number into a string which is suitable for presentation in the given locale.
Returns: String A string representing the number in the current locale.
Sample
Returns a string representing the number to a specified precision in fixed-point or exponential notation.
Returns: String A string representing the number to a specified precision in fixed-point or exponential notation.
Sample
Returns a string representing the number to a specified precision in fixed-point or exponential notation.
Parameters
Number precision An integer specifying the number of significant digits.
Returns: String A string representing the number to a specified precision in fixed-point or exponential notation.
Sample
Returns a string representing the specified Number object.
Returns: String A string representing the specified Number object.
Sample
Returns a string representing the specified Number object.
Parameters
Number radix An integer between 2 and 36 specifying the base to use for representing numeric values
Returns: String A string representing the specified Number object.
Sample
The largest representable number.
The smallest representable number.
Special value representing negative infinity; returned on overflow.
Special "not a number" value.
Special value representing infinity; returned on overflow.
Returns a string representing the number in exponential notation.
Returns a string representing the number in exponential notation.
Returns a string representing the number in fixed-point notation.
Returns a string representing the number in fixed-point notation.
Converts the number into a string which is suitable for presentation in the given locale.
Returns a string representing the number to a specified precision in fixed-point or exponential notation.
Returns a string representing the number to a specified precision in fixed-point or exponential notation.
Returns a string representing the specified Number object.
Returns a string representing the specified Number object.