How can I convert this string to get 1000000
? The problem is I always get 10000
:
console.log(parseFloat('10.000.000,00'.replace('.', ',').replace(/,(?=[^,]*$)/, '.')),'test');
Any suggestions?
parseFloat(a.replace(/\./g, '').replace(',', '.'))
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