4

Possible Duplicate:
How to avoid scientific notation for large numbers in javascript?
Javascript: how to avoid scientific notation when displaying large unumber

I have this code:

var f = 1000000000000000000000; // 1e+21
var fstr = f.toString(); // return "1e+21"

But I don't need scientific number representation. I want to get "1000000000000000000000" in 'fstr' variable. How I can get it?

Community
  • 1
  • 1
maxvasil
  • 159
  • 4
  • 12
  • 1
    better answer; http://stackoverflow.com/questions/1685680/how-to-avoid-scientific-notation-for-large-numbers-in-javascript – Alex K. Sep 28 '11 at 10:01

1 Answers1

0

You can find an util script here:

http://snippets.dzone.com/posts/show/2206

There is also a short example at the bottom of the page.

mateusz.fiolka
  • 3,032
  • 2
  • 23
  • 24