+ 4
How to limits units after zero?
I'm trying to improve a program with DOM, but I need to limit numbers after zero. For example if I have 77/9 = 25.66667, I only wanna 25.6. https://code.sololearn.com/We0u0OWKEs9T/?ref=app
3 Answers
+ 14
value.toFixed(number of digits after comma)
+ 3
just to update, that's work. Thanks man
+ 2
You can make it so the program only has a certain number of decimal points by * it by 1 and then number of decimal points ex 100