I've already searched but I haven't found a solution. I have a list products and each product has a different price:
ex1: 53990 ex2: 160115
How can I change these to a currency format? I'm from Brazil so ex1 needs to be: R$ 539,00
and ex2: R$ 1.601,15
I've already tried the code below, but it hasn't worked:
row.price.toFixed(3).replace(/(\d)(?=(\d{3})+\.)/g, '$1,')