Lodash _.ceil() Method
The _.ceil() method is used to compute number rounded up to precision.
_.ceil(number, [precision = 0])
Parameters: This method accepts two parameters as mentioned above and described below:
- number: This parameter holds the number to round up.
- [precision=0]: This parameter holds the precision to round up to.
Return Value: This method returns the rounded up number.
Example 1: Here, const _ = require(‘lodash’) is used to import the lodash library into the file.