Answers for "replace all chars in a string javascript"

2

how to replace all characters in a string javascript

const string = "a, b, c, d, e, f";
string.replace(/,/g, '');
console.log(string) //a b c d e f
Posted by: Guest on March-24-2021
6

js replace characters in a string

var str = "Original string!";
var str = str.replace("Original", "New");
Posted by: Guest on September-29-2020

Code answers related to "replace all chars in a string javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language