I want to format my numbers and I want these results.
I have tried .toFixed(2) but it didn’t yield the expected results.
Input     Result
50.000 => 50
50.900 => 50.9
50.940 => 50.94
50.941 => 50.94
Something like 0.## as formatting but in JavaScript.
 
     
     
    