javascript find and replace sting code example
Example 1: replace all character in string javascript
let a = "How to search and replace a char in a string";
while (a.search(" ", ""))
{
a = a.replace(" ", "");
}
console.log(a);
Example 2: str replace javascript all
str.replace(/abc/g, '');