短评 · ·

X 归档 2019-10-28

1 条动态 · 图 0 · 视频 0
Similar:

> Number.parseInt(1e21, 10)
1

Better:

> Math.trunc(1e21)
1e+21

https://exploringjs.com/impatient-js/ch_numbers.html#static-methods-of-number
类似效果:

> Number.parseInt(1e21, 10)
1

更好的写法:

> Math.trunc(1e21)
1e+21

https://exploringjs.com/impatient-js/ch_numbers.html#static-methods-of-number