Use Math.floor(num)
to round down num
to get its floor value.
roundDown = Math.floor(15/2)
console.log(roundDown); // prints 7
Search
Last updated June 23rd, 2025 • 4:37 pm
Use Math.floor(num)
to round down num
to get its floor value.
roundDown = Math.floor(15/2)
console.log(roundDown); // prints 7