- Lodash Tutorial
- Lodash - Home
- Lodash - Overview
- Lodash - Environment Setup
- Lodash - Array
- Lodash - Collection
- Lodash - Date
- Lodash - Function
- Lodash - Lang
- Lodash - Math
- Lodash - Number
- Lodash - Object
- Lodash - Seq
- Lodash - String
- Lodash - Util
- Lodash - Properties
- Lodash - Methods
- Lodash Useful Resources
- Lodash - Quick Guide
- Lodash - Useful Resources
- Lodash - Discussion
Lodash - ceil method
Syntax
Computes number rounded up to precision.
Creates a function that invokes func, with the this binding and arguments of the created function, while it's called less than n times. Subsequent calls to the created function return the result of the last func invocation.
Arguments
number (number) − The number to round up.
[precision=0] (number) − The precision to round up to.
Output
(number) − Returns the rounded up number.
Example
var _ = require('lodash'); console.log(_.ceil(5.004)); console.log(_.ceil(5.004,2));
Save the above program in tester.js. Run the following command to execute this program.
Command
\>node tester.js
Output
6 5.01
lodash_math.htm
Advertisements
To Continue Learning Please Login
Login with Google