Javatpoint Logo
Javatpoint Logo

JavaScript Number toExponential method

The JavaScript number toExponential() method converts the given number into an exponential notation and returns it in the form of string.

Syntax

The toExponential() method is represented by the following syntax:

Parameter

num - It is optional. It represents an integer that specify the digits to be placed after decimal point.

Return

A string that represents exponential notation of the given number.

JavaScript Number toExponential method example

Here, we will understand toExponential() method through various examples.

Example 1

Let's see a simple example of toExponential() method.

Test it Now

Output:

9.89721e+5

Example 2

In this example, we will pass an integer that specify the digits to be placed after decimal point.

Test it Now

Output:

9.90e+5
9.8972e+5
9.897210e+5

Next TopicJavaScript Number




Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA