JavaScript Number.prototype.toExponential() example

Posted by Editorial Staff | Updated on

JavaScript Number.prototype.toExponential() example. If you use the toExponential() method for a numeric literal and the numeric literal has no exponent and no decimal point, leave whitespace(s) before the dot that precedes the method call to prevent the dot from being interpreted as a decimal point.


Return value

A string representing the given Number object in exponential notation with one digit before the decimal point, rounded to fractionDigits digits after the decimal point.

JavaScript Example: Number.toExponential()


Read more about toExponential() function here:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers