What will be the output of below Javascript code:-

var output = Math.ceil(-30.02);
alert(output);

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

Output would be: -30

As we know that,Ceil method returns the smallest integer or value and here -30 is a smallest numeric value,so it will omit decimal part and return only -30.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response