Skip to content

JavaScript exponential notation | Example code

  • by

The toExponential() method in JavaScript is used to convert a number to its exponential notation form. It returns a string representing the Number object in exponential notation.


JavaScript exponential notation example

Simple HTML example code converts a number into an exponential notation.

<!DOCTYPE html>

    let num = 5.56789;
    let n1 = num.toExponential();
    let n2 = num.toExponential(3); 




JavaScript exponential notation

Do comment if you have any doubts or suggestions on this JS exponential notation topic.

Note: The All JS Examples codes are tested on the Firefox browser and the Chrome browser.

OS: Windows 10

Code: HTML 5 Version

Leave a Reply

Your email address will not be published. Required fields are marked *