The JavaScript function parseInt can be used to force conversion of a given parameter to an integer, whether that parameter is a string, float number, number, etc.
parseInt
Don't use parseInt to do this operation -- use Math.floor.
Math.floor
Using parseInt to floor a number is not always going to yield correct results. parseInt(4e21) returns 4, not 4e21. parseInt(-0) returns 0, not -0.
floor
parseInt(4e21)
4
4e21
parseInt(-0)
0
-0