Answers for "replace a comma with space javascript"

2

replace multiple spaces with single space javascript

string = string.replace(/\s\s+/g, ' ');
Posted by: Guest on July-19-2020
0

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"
Posted by: Guest on January-27-2021

Code answers related to "replace a comma with space javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language