I have a list of numbers with 3 decimals. I need to remove the last decimal only if it's zero, e.g.
var x = 1.500 // I need 1.50
var y = 1.490 // I need 1.49
var z = 1.579 // I need 1.579
with
var x = 1.500
var noZeroes = x.toString() // I get "1.5", I need "1.50"