> For the complete documentation index, see [llms.txt](https://lodash.shujuwajue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lodash.shujuwajue.com/math/round.md).

# \_.round（四舍五入）

**语法：**

```javascript
_.round(number, [precision=0])
```

**源代码链接：**[source](https://github.com/lodash/lodash/blob/4.17.10/lodash.js#L16446)

**npm包链接：**[npm package](https://www.npmjs.com/package/lodash.round)

**描述：**

根据`precision`（精度） 四舍五入`number`。

**开始版本：**&#x33;.10.0

**参数：**

* `number (number)`: 要四舍五入的数字。
* `[precision=0] (number)`: 四舍五入的精度。

**返回值：**

* `(number)`: 返回四舍五入的数字。

**例子：**

```javascript
_.round(4.006);
// => 4

_.round(4.006, 2);
// => 4.01

_.round(4060, -2);
// => 4100
```
