How do I replace all occurrences of a string in JavaScript?
5.4k
Given a string:
s = "Test abc test test abc test test test abc test test abc";
This seems to only remove the first occurrence of abc
in the string above:
s = s.replace('abc', '');
How do I replace occurrences of it?