var str = 4.5 + '';
str; // '4.5'
Number 上的常用属性方法
Number.prototype.toFixed([精度]) - 取几位小数。...会对取的最后一位数字做四舍五入的操作。...Number.MAX_VALUE; // 1.79e+308
Math 上的常用属性方法
Math.PI - 圆周率的近似值。...Math.abs(-2); // 2
Math.abs(2); // 2
Math.abs(0); // 0
Math.min(数字1[, 数字2, [, ...] ] - 返回一群数字中的最小值。...Math.min(0, 10, 5.4, -3.4); // -3.4
Math.min.apply(null,[0, 10, 5.4, -3.4]); // -3.4 (求数组中的最小值)
Math