-3
I need to turn a number that is in the format 20.000,00
(with points in each thousand) for a type number float
, how do I do that?
var value = $('#money').val()
var currency = value.replace(",00", "")
var money = currency.replace(/[ ,.]/g, '');
Just one remark - Float for money, in virtually any situation, is terrible idea - Reading suggestion
– Bacco
How to represent a Javascript decimal then?
– GeekSilva