JavaScript Number toExponential methodThe JavaScript number toExponential() method converts the given number into an exponential notation and returns it in the form of string. SyntaxThe toExponential() method is represented by the following syntax: Parameternum - It is optional. It represents an integer that specify the digits to be placed after decimal point. ReturnA string that represents exponential notation of the given number. JavaScript Number toExponential method exampleHere, we will understand toExponential() method through various examples. Example 1Let's see a simple example of toExponential() method. Test it NowOutput: 9.89721e+5 Example 2In this example, we will pass an integer that specify the digits to be placed after decimal point. Test it NowOutput: 9.90e+5 9.8972e+5 9.897210e+5 Next TopicJavaScript Number |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India