Number toExponential()

toExponential() method format the number in exponential notation. toExponential() accepts the number of decimal places to output as the argument.

 
<!DOCTYPE html>
<html>
<head>
    <title>Example</title>
    <script type="text/javascript">
        var num = 10; 
        document.writeln(num.toExponential(1)); //"1.0e+1" 
       
    </script>
</head>
<body>
</body>
</html>
  
Click to view the demo
Home 
  JavaScript Book 
    Essential Types  

Number:
  1. The Number Type
  2. Number toExponential()
  3. Number toFixed()
  4. Number toPrecision()
  5. Number toString()
  6. Number valueOf()
  7. Converting Strings to Numbers
  8. typeof and instanceof for Number objects and primitive values