const totalBalance = (x, y) => { let total = parseInt(x.replace(/,/g, "")) + parseInt(y.replace(/,/g, "")); return total.toString().replace(/B(?<!.d*)(?=(d{3})+(?!d))/g, ","); //Output structure will be like:23,236// };