floor
最后更新于:2022-04-02 00:03:50
## floor
+ [link](./floor "Link to this entry.")
+ [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L13905 "View in source.")
+ [npm](https://www.npmjs.com/package/lodash.floor "See the npm package.")
```
_.floor(number, [precision=0])
```
根据 `precision` 向下保留 `number`。
### 参数
1. number (number)
要向下保留的数
2. [precision=0] (number)
精度
### 返回值 (number)
返回向下保留的结果
### 示例
```
_.floor(4.006);
// => 4
_.floor(0.046, 2);
// => 0.04
_.floor(4060, -2);
// => 4000
```
';