This method is useful for formatting number values. This is especially helpful when presenting tables of scientific data, which may require values of a wide range of magnitudes to be presented in a similar way.
The argument value indicates the precision or decimal places of accuracy to the right of the decimal point character. If the argument is undefined, then as many digits as are necessary to completely distinguish the value are presented (up to the mathematical accuracy of the implementation).
Prev | Home | Next |
Number.prototype | Up | Number.toFixed() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |