One of the most common tasks is to format a number for currency display- an integer followed by two decimals.
You may be tempted to use number rounding to first shift the number’s decimal places (via multiplication), round it, then shift the decimal back (via division) to pound the number into your hard earned dollar, though [...]
Filed under: Basic Scripts, Scripts, javascript | Tagged: decimal, digits, fixed, IE, javascript, NS, number, precision, significant, toFixed, toPrecision | Leave a Comment »
