replace all instances of the word js code example Example: replace all javascript str.split(search).join(replacement);