The Math object's floor() method returns the next integer less than or equal to the value it is passed. For example:
var result = Math.floor(5/3) //result = 1
The result is the equivalent of having the decimal part (or remainder) removed after the division operation has taken place, which is exactly what an integral division operation would do.
Source: Myra Pelz
Viewed 4936 times