\\
| Property Summary | |
|---|---|
| Number | MAX_VALUE The largest representable number. |
| Number | MIN_VALUE The smallest representable number. |
| Number | NEGATIVE_INFINITY Special value representing negative infinity; returned on overflow. |
| Object | NaN Special "not a number" value. |
| Number | POSITIVE_INFINITY Special value representing infinity; returned on overflow. |
| Method Summary | |
|---|---|
| String | toExponential(fractionDigits) Returns a string representing the number in exponential notation. |
| String | toFixed(digits) Returns a string representing the number in fixed-point notation. |
| String | toPrecision(precision) Returns a string representing the number to a specified precision in fixed-point or exponential notation. |
| Property Details |
|---|
MAX_VALUE |
The largest representable number. |
| Returns |
| External links https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/MAX_VALUE |
Sampleapplication.output("Largest number: " + Number.MAX_VALUE); |
MIN_VALUE |
The smallest representable number. |
| Returns |
| External links https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/MIN_VALUE |
Sampleapplication.output("Smallest number: " + Number.MIN_VALUE); |
NEGATIVE_INFINITY |
Special value representing negative infinity; returned on overflow. |
| Returns |
| External links |
Sampleapplication.output("Negative infinity: " + Number.NEGATIVE_INFINITY); |
NaN |
Special "not a number" value. |
| Returns Object |
| External links https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/NaN |
Sampleapplication.output("NaN: " + Number.NaN); |
POSITIVE_INFINITY |
Special value representing infinity; returned on overflow. |
| Returns |
| External links |
Sampleapplication.output("Positive infinity: " + Number.POSITIVE_INFINITY); |
| Method Details |
|---|
toExponential |
| StringtoExponential(fractionDigits) |
Returns a string representing the number in exponential notation. |
| Parameters [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. |
| External links https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/toExponential |
Samplevar n = 123.45678;
application.output(n.toExponential(3));
|
toFixed |
| StringtoFixed(digits) |
Returns a string representing the number in fixed-point notation. |
| Parameters [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. |
| External links https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/toFixed |
Samplevar n = 123.45678;
application.output(n.toFixed(3));
|
toPrecision |
| StringtoPrecision(precision) |
Returns a string representing the number to a specified precision in fixed-point or exponential notation. |
| Parameters [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. |
| External links https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Number/toPrecision |
Samplevar n = 123.45678;
application.output(n.toPrecision(5));
|