📅  最后修改于: 2022-03-11 15:01:52.400000             🧑  作者: Mango
const search = ' ';
const replaceWith = '-';
const result = 'duck duck go'.replaceAll(search, replaceWith);
result; // => 'duck-duck-go'