Friday, February 22, 2013

JavaScript Numbers

var v = 2.1235423884;
var vRounded_str = v.toFixed(5);  // "2.12354"

var vInt = parseInt(v);  // 2