var x = 1.234; var y = x.toExponential(2); // returns y = 1.23e+0 var y = x.toExponential(5); // returns y = 1.23450e+0