change string code example
Example 1: javascript replace
var res = str.replace("find", "replace");
Example 2: replace all javascript
str.split(search).join(replacement);
var res = str.replace("find", "replace");
str.split(search).join(replacement);