I have tried using Number(x).toLocaleString()
, but this only gives me 10,000.
When I use parseFloat(row.profit).toFixed(2)
it gives me 10000.00. I tried combining parseFloat(Number(row.profit)toLocaleString()).toFixed(2)
But not give me the desired output which should be 10,000.00.
How can I achieve this?