Math floor()
The Math.floor method is used to round off the number passed as a parameter to its nearest integer in Downward direction of rounding i.e. towards the lesser value.
Parameters: This method accepts single parameter asmentioned above and described below:
Value: It is the value which is to be tested for Math.floor.
Return Value: The Math.floor() method returns the smallest integer greater than or equal to the given number.
Input : Math.floor(.89)
Output: 0
Input : Math.floor(-89.02)
Output : -90
Input : Math.floor(0)
Output : 0
Last updated
Was this helpful?