I dont know whether this question is a duplicate or not because i can't find solution for my case.
I have a number ,say 12345 and i want to apply thousand seperator as comma(,) and the code for that is
12345.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
and i am getting as 12,345 as a string. I want it as a number.
If i use "Number()" or "parseFloat()", it's coming as NaN. I have no idea how to convert the string with thousand seperator to Number with thousand seperator
Is there any solution for my case?