lodash round
生活随笔
收集整理的這篇文章主要介紹了
lodash round
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
_.round(number, [precision=0])
更多專業前端知識,請上 【猿2048】www.mk2048.com
根據 precision 四舍五入 number。
_.round(4.006); // => 4 _.round(4.006, 2); // => 4.01 _.round(4060, -2); // => 4100?
更多專業前端知識,請上 【猿2048】www.mk2048.com
總結
以上是生活随笔為你收集整理的lodash round的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: js 变量提升与函数提升
- 下一篇: lodash 数组元素查找 findIn