How to remove comma (amount Precision) from number in JavaScript ?

+1 vote
32 views
asked Jun 19 in java script by anonymous

Hi All

  How to remove comma (amount Precision) from number which comes dynamically in JavaScript ?

1 Answer

0 votes
answered Jun 19 by admin (8,115 points)
Hi

  Try the below piece code

          var selectedAmount = '10,00.0'
            selectedAmount = selectedAmount.replace(/\,/g,'');
            selectedAmount = Number(selectedAmount);
...