Strings In Depth15 / 18
Up next

Replace

const s = "a-b-c-d";
// replace changes only the first match
console.log(s.replace("-", "_"));
// replaceAll changes every match
console.log(s.replaceAll("-", "_"));
What you're solving

replace vs replaceAll