Number, Math | JavaScript Tutorial
Rounding to given precision It is often required round to precision, like: two digits after the decimal point. An old trick is multiply and divide on 10 with given number of zeroes: var n = 3.456 alert( Math.round( n * 100 ) / 100 ) // 3.456 -> 345.6 -> 3...