What does Math.Ceil method do in Javascript?

 Posted by Rajesh_Kumar on 2/14/2014 | Category: JavaScript Interview questions | Views: 2164 | Points: 40
Answer:

Ceil is an static method of Math class.It rounds a number upward to it's nearest integer.
In other word,we can say that it returns the smallest integer greater than or equal to a number.
Note:- If we pass parameter as an integer no decimal,the value will not be rounded.

Syntax:
Math.ceil(any_numeric_or_decimal_value);


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response