photoxprt1868
Programmer
Hello,
How can I round using Math.round but making sure to always have two digits. In other words 45.20 vs 45.2
this is how I have it now
var difference = Math.round((fuel2006 - fuel2005)*100)/100;
but I'm looking the last digit if it's 0. I need that 0 there.
Thank you
How can I round using Math.round but making sure to always have two digits. In other words 45.20 vs 45.2
this is how I have it now
var difference = Math.round((fuel2006 - fuel2005)*100)/100;
but I'm looking the last digit if it's 0. I need that 0 there.
Thank you