What does Math.Floor function do?

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

Floor is an static method of Math class.The Math.floor() function returns the largest integer less than or equal to a number.
In other words,we can say that,it rounds a number downward to its nearest integer.

Note: If we pass only integer value(no decimal value),then the value will not be rounded.

Syntax:-
Math.floor(any_numeric_decimal_number);


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response