I have a number, say 2500.00, and I want to convert the number to 2.500.00. Thus, we can replace the special character, replacing it with
var x = 2,500.00; x.replace(/,/g,".");
and for "Dot" we can do it too. But in this case, this will not work, because when we use the substitution function for the comma, as indicated above, the number will become 2.500.00, and if we apply now, it will become 2500.00.
So, is there a way to convert 2,500.00 to 2,500,00?
source share