Number(1).toFixed(2); // 1.00
Number(1.341).toFixed(2); // 1.34
var x = 3.14
x.toPrecision(6) // 3.14000