I\'ve got a currency input and need to return only significant digits. The input always has two decimal places, so:
4.00 -> 4 4.10 -> 4.1 4.01 ->
string to string: parseFloat(value).toFixed(2); string to number: +(parseFloat(value).toFixed(2)) number to number: Math.round(value*100)/100; number to string: (Math.round(value*100)/100).toFixed(2);