Give some example of Math.Floor method?

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

Math.Floor method rounds the lowest value to its nearest integer.

Below are some example of Math.Floor method as:

Math.floor(50.07); //Output would be 50 and it will omit decimal portion
Math.floor(-50.07); //Output would be -51
Math.floor(50);//As there is no decimal part provided,then Output would be integer part as 50


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response