Hi,
I'm calculating a number that I want it to have 2 decimal ex: 147.65 or 25.00
In c++ I would do a .format on my variable but how can I do that in javascript ?
thanks
Printable View
Hi,
I'm calculating a number that I want it to have 2 decimal ex: 147.65 or 25.00
In c++ I would do a .format on my variable but how can I do that in javascript ?
thanks
I found it, here is the solution
myvar.toFixed(numberofdecimaldigit);