Math.ceil method

The Math.ceil method rounds a fractional number to an integer always up.

Syntax

javascriptMath.ceil(number);

Example

Let's round the number 3.00001 up:

javascriptconsole.log(Math.ceil(3.00001));

The code execution result:

javascript4

See also