Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.
toPrecision(precision?)
precision optional
Number of significant digits. Must be in the range from 1 to 100, inclusive. If omitted, as many digits as necessary are used to represent the number.
A string representation of the number.
(1234.5678).toPrecision(2)
"1.2e+3"
(1234.5678).toPrecision(6)
"1234.57"