Can you round a number in javascript to 1 character after the decimal point (properly rounded)?
I tried the *10, round, /10 but it leaves two decimals at the end of
To complete the Best Answer:
var round = function ( number, precision ) { precision = precision || 0; return parseFloat( parseFloat( number ).toFixed( precision ) ); }
The input parameter number may "not" always be a number, in this case .toFixed does not exist.