24.134. Number.toExponential( ): format a number using exponential notationECMAScript v324.134.1. Synopsisnumber.toExponential(digits) 24.134.1.1. Arguments
24.134.1.2. ReturnsA string representation of number, in exponential notation, with one digit before the decimal place and digits digits after the decimal place. The fractional part of the number is rounded, or padded with zeros, as necessary, so that it has the specified length. 24.134.1.3. Throws
24.134.2. Examplevar n = 12345.6789; n.toExponential(1); // Returns 1.2e+4 n.toExponential(5); // Returns 1.23457e+4 n.toExponential(10); // Returns 1.2345678900e+4 n.toExponential( ); // Returns 1.23456789e+4 24.134.3. See AlsoNumber.toFixed( ), Number.toLocaleString( ), Number.toPrecision( ), Number.toString( ) |