Rounds a number down to the nearest integer.
The number to round down.
The greatest integer less than or equal to the given number.
floor(3.9); // returns 3floor(-2.1); // returns -3 Copy
floor(3.9); // returns 3floor(-2.1); // returns -3
Rounds a number down to the nearest integer.