Developer's Blog
var
num = 2.443242342;
alert(num.toFixed(2));
// 2.44
num = 500.2349; result = num.toPrecision(4); // result will equal 500.2
num = 500.2349;
result = num.toPrecision(4);
// result will equal 500.2
No comments:
Post a Comment