多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## round + [link](./round "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L14044 "View in source.") + [npm](https://www.npmjs.com/package/lodash.round "See the npm package.") ``` _.round(number, [precision=0]) ``` 根据 precision 四舍五入 number。 ### 参数 1. number (number) 要四舍五入的值 2. [precision=0] (number) 精度 ### 返回值 (number) 返回四舍五入的结果 ### 示例 ``` _.round(4.006); // => 4 _.round(4.006, 2); // => 4.01 _.round(4060, -2); // => 4100 ```