I know how to do decimal 2 places.
use toFixed(2);
but the problem is all of number in list is always 2 decimal places.
I want to if fraction use decimal 2 places, if non fraction use decimal 0 places.
number display
------ -------
1 1
3 3
1.341 1.34
1.345555 1.35
2 2