📜  js 全部替换 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:52.400000             🧑  作者: Mango

代码示例6
const search = ' ';
const replaceWith = '-';
const result = 'duck duck go'.replaceAll(search, replaceWith);
result; // => 'duck-duck-go'