This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.
Smartphone icons created by Freepik - Flaticon
Math.floor(x) returns the value of x rounded down to its nearest integer:
document.getElementById("demo").innerHTML = Math.floor(4.7);