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