• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 566
  • Last Modified:

conversion of exponent values

When I multiply the values in JavaScript, it generates with the exponent results. How can I get the value like something like this, 0.000000034?

Ex:
alert(0.000034/1000);    // Result = 3.4e-8

but it should alert
(0.000034/1000) = 0.000000034

How to do?
0
Loganathan Natarajan
Asked:
Loganathan Natarajan
1 Solution
 
aherpsCommented:
You could do:
alert(Integer.toString(0.000034/1000));
0
 
Loganathan NatarajanLAMP DeveloperAuthor Commented:
there is an error,  "Integer is undefined "
0
 
David H.H.LeeCommented:
Hi logudotcom,
You can use ToFixed() method to format the returned result.
http://www.w3schools.com/jsref/jsref_tofixed.asp
eg:
alert(parseFloat(0.000034/1000).toFixed(10));    
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now