how to replace a particular string with another string in javascript code example Example: replace each string by another string javascript str.split(search).join(replacement)