how to replace all of one substring in javascript code example Example: replace all javascript str.split(search).join(replacement);