1

I am working on a cryptocurrencie application where i have to convert a string looking like this '0.00000001' to a number float/decimal looking like this 0.00000001

I have tried

toPrecision()

parseFloat()

parseInt()

Number()

toFixed(8)

'0.00000001' * 1

The results will typically look something like this 5.3e-7

Is there nothing that can be done in this particular case?

ii iml0sto1
  • 1,654
  • 19
  • 37

0 Answers0