I would like to format my numbers to always display 2 decimal places, rounding where applicable.
Examples:
number display ------ ------- 1
Are you looking for floor?
var num = 1.42482; var num2 = 1; var fnum = Math.floor(num).toFixed(2); var fnum2 = Math.floor(num2).toFixed(2); alert(fnum + " and " + fnum2); //both values will be 1.00