javascript replace any string with another code example Example: replace each string by another string javascript str.split(search).join(replacement)