Number toExponential

Description

toExponential() format number in exponential notation (e-notation).

toExponential() accepts the number of decimal places as parameter.

Example


var num = 10;
console.log(num.toExponential(1));    //"1.0e+1"

The code above generates the following result.





















Home »
  Javascript »
    Javascript Introduction »




Script Element
Syntax
Data Type
Operator
Statement
Array
Primitive Wrapper Types
Function
Object-Oriented
Date
DOM
JSON
Regular Expressions