JavaScript Math.floor()
JavaScript Math.floor()
The Math.floor() method is used to round a number downwards to the nearest integer and then returns the result.
Syntax:-
Its syntax is:- Math.floor(x)
Return:-
Its return is:- number rounded downward the nearest integer.
Further Explanantion:-
Parameter | Description |
---|---|
x | Required. A number. |