0

How to make decimal fractures appear as integer in JavaScript?

The result maybe long decimal fracture I want ro make the result smaller

18th Feb 2020, 6:15 AM
pR¤[]{}^-^}[].js
pR¤[]{}^-^}[].js - avatar
4 ответов
+ 1
Have you looked at the demo code? This : https://code.sololearn.com/W1OtO21jXR4y/?ref=app Explanation : toFixed is a Number.prototype function, you need to bind to a Number instance. toFixed() truncates a number. If you need rounding, it is Math.round()
18th Feb 2020, 6:30 AM
Gordon
Gordon - avatar
+ 1
U helped me You answered me before So thanx
18th Feb 2020, 6:32 AM
pR¤[]{}^-^}[].js
pR¤[]{}^-^}[].js - avatar
0
Can you explain what did you write💔
18th Feb 2020, 6:27 AM
pR¤[]{}^-^}[].js
pR¤[]{}^-^}[].js - avatar