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
|
JavaTpoint offers too many high quality services. Mail us on [email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected]
Duration: 1 week to 2 week