0
If 42 and 42.00 both are handled the same way ...
If 42 and 42.00 both are handled the same way in JS, how do I ensure that, when my user interacts with my page, my webpage provides output with/without decimals as desired?
2 Answers
0
conver the output to integers?
0
Use string manipulation functions to figure out wether the output have decimal point or not. If not append decimal point to the output followed by zeros.