Answers for "how to remove the commas from a to string array in javascript"

4

remove commas from string javascript

var stringWithCommas = 'a,b,c,d';
var stringWithoutCommas = stringWithCommas.replace(/,/g, '');
console.log(stringWithoutCommas);
Posted by: Guest on May-17-2020
2

javascript array to string remove comma

var array = [0, 1, 2, 3, 4, 5];
var string = array.join("");
console.log(string); // -> 012345
Posted by: Guest on July-16-2021

Code answers related to "how to remove the commas from a to string array in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language