how to replace commas with nothing 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"