The JavaScript floor() method rounds a number DOWNWARDS to the nearest integer, and returns the result
var MyInt = Math.floor(x)