I would like to format my numbers to always display 2 decimal places, rounding where applicable.
Examples:
number display ------ ------- 1
Just run into this one of longest thread, below is my solution:
parseFloat(Math.round((parseFloat(num * 100)).toFixed(2)) / 100 ).toFixed(2)
Let me know if anyone can poke a hole