📅  最后修改于: 2022-03-11 15:03:28.640000             🧑  作者: Mango
代码示例5
let a = "How to search and replace a char in a string";
while (a.search(" ", ""))
{
a = a.replace(" ", "");
}
console.log(a);