The replaceAll method is not supported in Internet Explorer. If you need to support the browser, use the replace method with the g flag instead.
const a = '1,000,000' a.replace(/,/g, ''); // g for replace ALL console.log(a) // '1000000'