You would avoid doing what, exactly? Arithmetic? Calculating money? That’s going to severely limit your job prospects, my friend. Regardless of how it’s presented, floating point arithmetic has all the same limitations and is prone to the same errors in C#, C, MySQL, Python, Ruby, Scala, JavaScript, and every other language out there. Unless you’re dealing with many millions of dollars, JavaScript is entirely capable of doing the math you need it to. Follow foresterr’s advice and scale your calculations as needed.

`.toFixed()`

and `.toPrecision()`

return a string because the only reason you’d need these is for displaying a quantity on a page. Trailing zeros are there for humans, so `2.5 === 2.50`

.