From http://www.w3schools.com (Copyright Refsnes Data)

JavaScript toExponential() Method


Number Object Reference JavaScript Number Object

Definition and Usage

The toExponential() method converts the value of an object into an exponential notation.

Syntax

NumberObject.toExponential(num)

Parameter Description
num Required. Specifies the number of decimal places in the exponential notation


Example

Example

Convert 10000 to an exponential notation:

<script type="text/javascript">

var num=new Number(10000);
document.write(num.toExponential(1));

</script>

The output of the code above will be:


Try it yourself »


Number Object Reference JavaScript Number Object

From http://www.w3schools.com (Copyright Refsnes Data)