js中数字操作和进制转换
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| let n= 12.5889458 n.toFixed(0) Math.pow(2,53) Math.round(.6) Math.ceil(.6) Math.floor(.6) Math.max(1,2,3) Math.min(1,2,3) Math.random() Math.PI Math.E Math.sqrt(3) Math.pow(3,1/53) Math.cos(10) Math.log(10) Math.log(100)/Math.LN10 Math.log(100)/Math.LN2 Math.exp(3) n.toExponential(1)
n.toPrecision(4) parseInt('11',2) parseInt('385ssss')
|
本文标题:js数字的函数
文章作者:霖
发布时间:2021年01月16日 - 16时37分
最后更新:2021年01月16日 - 16时55分