Ben Shelock Ben Shelock - 1 year ago 178
Javascript Question

How can I round down a number in Javascript?

How can I round down a number in JavaScript?

math.round()
doesn't work because it rounds it to the nearest decimal.

I'm not sure if there is a better way of doing it other than breaking it apart at the decimal point at keeping the first bit. There must be...

Answer Source
Math.floor()

is the answer.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download