react how to remove commas from a string

140

react how to remove commas from a string -

var stringWithCommas = 'a,b,c,d';
var stringWithoutCommas = stringWithCommas.replace(/,/g, '');
console.log(stringWithoutCommas);

Comments

Submit
0 Comments