Math.ceil(x) -- Returns the smallest integer (rounding function) greater than or equal to the numeric argument, rounding up the number
Ceil is the abbreviation of ceiling, which means "upper limit" in Chinese.
Reference URL: http://www.dreamdu.com/javascript/Math.ceil/
ceil function syntax
Math.ceil(x);
ceil function parameters
x -- is a number of type number
ceil function return value
Returns the smallest integer greater than or equal to x
ceil function example
document.write(Math.ceil(5.99));
document.write(Math.ceil(-5.99));
document.write(Math.ceil(1.01));
document.write(Math.ceil(-1.01));
result:
6
-5
2
-1