This functions accepts a single parameter is the number to be rounded to its nearest integer in upward rounding method.
Javascript floor ceiling.
Math floor x parameters x a number.
A number representing the largest integer less than or equal to the specified number.
The math ceil function in javascript is used to round the number passed as parameter to its nearest integer in upward direction of rounding i e towards the greater value.
Because ceil is a static method of math you always use it as math ceil rather than as a method of a math object you created math is not a constructor.
In other words the floor function rounds a number down and returns an integer value.
If the passed argument is an integer the value will not be rounded.
Since floor is a static method of math it can be used without creating an object.
Because floor is a static method of math you always use it as math floor rather than as a method of a math object you created math is not a constructor.
Ceil the ceil method rounds a number upwards to the nearest integer and returns the result.
The ceil method rounds a number upwards to the nearest integer and returns the result.