English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
toExponential()The method returns a string representing a Number object in exponential notation.
number.toExponential(fractionDigits)
var num = 15; num.toExponential();Test and see‹/›
All browsers fully support the toExponential() method:
Method | |||||
toExponential() | Is | Is | Is | Is | Is |
Parameter | Description |
---|---|
fractionDigits | (Optional) An integer, specifying the number of digits after the decimal point |
Return value: | A string, representing the number in exponential notation |
---|---|
Exception cases: |
|
JavaScript Version: | ECMAScript 3 |
Convert a number to exponential notation:
var num = 15; num.toExponential(6);Test and see‹/›