0

pic

like the picture shows, when console.log huge number in javescript, it will output a number with scientific notation, but I want it shows with normal notation, what should i do?

peilin
  • 23
  • 5

1 Answers1

0

When you console log, just use precision and print it.

Code Example:

var num = 990000000000000000000000
num.toPrecision(25)

Result:

"990000000000000020971520.0"
Mohit Ajwani
  • 1,328
  • 12
  • 24