string.replace javascript with array code example Example: replace all javascript str.split(search).join(replacement);