How to convert a String containing Scientific Notation to correct JavaScript number format?


To convert a string with Scientific Notation, use the Number function. Pass the value to this function.

Example

You can try to run the following code to convert a string to correct number format −

Live Demo

<!DOCTYPE html>
<html>
   <body>
      <script>
         document.write("String with Scientific Notation converted below:<br>");
         document.write(Number("7.53245683E7"));
      </script>
   </body>
</html>

Output

String with Scientific Notation converted below:
75324568.3

Updated on: 17-Jun-2020

1K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements