I am facing the issue in division of numbers in java script.
Example:
var x= 2500, var y = 100
alert(x/y)
is showing 25.
I need the answer in 25.00 format. What can I do?
When I divide 2536/100, it gives as expected.
You can try number.toFixed(x)
alert( (x/y).toFixed(2) )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With