floor
The floor() method rounds a number down to the nearest integer less than or equal to it. This function is useful to ensure a number never exceeds a certain integer value.
Interactive example
Syntax
typescript
function floor<
GenericInput extends number,
>(input: GenericInput): numberParameters
input: The number to round down.
Return value
The largest integer less than or equal to the given number.
