how to replace all commas in a string in javascript code example
Example: how to replace commas with nothing in javascript
var myStr = 'this,is,a,test';
var newStr = myStr.replace(/,/g, '');
console.log( newStr ); // "this-is-a-test"
var myStr = 'this,is,a,test';
var newStr = myStr.replace(/,/g, '');
console.log( newStr ); // "this-is-a-test"