javascript how-to-replace-all-occurrences-of-a-string code example Example: replace all javascript str.split(search).join(replacement);