Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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"
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #replace #commas #javascript
ADD COMMENT
Topic
Name
5+7 =