Articles → JavaScript → Toexponential() Method In Javascript

Toexponential() Method In Javascript






Purpose





Scientific Notation







Syntax


num.toExponential()





Example


<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title>Exponential Number Example</title>
    <script>
        var num = 2;
        alert(num.toExponential());
    </script>
</head>
<body>
</body>
</html>



Output


Picture showing the output of the toExponential() method in JavaScript



Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, July 12, 2017

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250