Use Math.round(num * 100) / 100
Edit: to ensure things like 1.005 round correctly, we use
Math.round((num + Number.EPSILON) * 100) / 100
Use Math.round(num * 100) / 100
Edit: to ensure things like 1.005 round correctly, we use
Math.round((num + Number.EPSILON) * 100) / 100
For further actions, you may consider blocking this person and/or reporting abuse
zJairO -
Soumya Rauth -
Jasmine Mae -
Cyb3r Ninja 🥷 -
Top comments (0)