Math.ceil method
The Math.ceil method rounds
a fractional number to an integer
always up.
Syntax
Math.ceil(number);
Example
Let's round the number
3.00001 up:
console.log(Math.ceil(3.00001));
The code execution result:
4
See also
-
the
Math.floormethod
that rounds a number down -
the
Math.roundmethod
that also rounds a number to an integer -
the
toFixedandtoPrecisionmethods
that also round a number