From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript Math Object
The ceil() method returns the value of a number rounded UPWARDS to the nearest integer.
| Math.ceil(x) |
| Parameter | Description |
|---|---|
| x | Required. A number |
ExampleUse the ceil() method on different numbers:
The output of the code above will be:
Try it yourself » |
JavaScript Math Object
From http://www.w3schools.com (Copyright Refsnes Data)