javascript string substitution code example
Example 1: javascript replace
var res = str.replace("find", "replace");
Example 2: str replace javascript all
str.replace(/abc/g, '');
var res = str.replace("find", "replace");
str.replace(/abc/g, '');