• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 563
  • 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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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