r/learnjavascript • u/Dowlphin • Aug 14 '26
Rounding won't work
(SOLVED)
I tried several approaches I read on the WWW about how to round a number. I do a calculation with values entered in input fields and the output field yields the correct result, but with 14 decimal places!
The simplest attempt I tried is the format Number(outputfield=inputfield1*inputfield2).toFixed(1);
2
Upvotes
View all comments
Show parent comment
3
u/Dowlphin Aug 14 '26
Ah, of course! A simple mistake of ordering I made there. Thank you.