Use CSS Grid like a pro
Learn CSS Grid with live examples and images.
Check it outWhenever you invoke Math.floor(), the method rounds down its argument to the nearest integer.
Math.floor()
MethodMath.floor()
accepts only one argument. Here is the syntax:
The value
argument represents the number you wish to floor (round down) to the nearest integer.
Below are examples of the Math.floor()
method.
9
to the nearest integer9.999
to the nearest integer-9.999
to the nearest integerThe snippet above returned -10
because -10
is the integer directly below -9.999
on the number line. In other words, -9
is greater than -9.999
. But -10
is less than -9.999
.
0.91
to the nearest integer