const num = 5642.7
const floored = Math.floor (num)
console.log(floored);
Click Run to execute JavaScript.
Code runs in an isolated environment.