round
最后更新于:2022-04-02 00:04:03
## 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
```
';