Math Floor Example

Round a number down to the nearest integer.

Preview

Code

<script>
let num = 4.9;

console.log(Math.floor(num));
</script>

More JS Math Examples (7)