Remove commas from the string using JavaScript

To remove the commas, you’ll need to use replace on the string. To convert to a float so you can do the maths, you’ll need parseFloat:

var total = parseFloat('100,000.00'.replace(/,/g, '')) +
            parseFloat('500,000.00'.replace(/,/g, ''));

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)