0
Hello friends I’m having trouble putting the values in real with javascript below this the code where this the price value preco = parseFloat (preco.replace(",",".") );
the amount is R $ 60.90 with point, in this other format parseFloat (preco.replace(",","") );
he is like this R $ 6090 no point and no comma, I would like it to be like this: R $ 60,90 some beast there give this strength here
After the first
preco
that you put:preco = String(preco).replace('.', ',');
– JuniorNunes
So I put String(price). replace('.', ','); got 060.50
– Hemerson Prestes
To make calculations you have to use with dot. After doing the calculations you change to comma to display.
– Antonio Alexandre