数字方法的简单解析

109 阅读1分钟

toFixed

Number.toFixed(2);//保留两位小数,并转化为string类型;

toPrecision

保留有效数字;

toE

转化成科学计数法形式的格式;