e.g
1.2=1 1.5=1 1.9=1
Using Math.floor(number).
You can also use
newNumber = parseInt(number);
for negative numbers you can just use Math.abs(num) and it will knock off the - sign from the start