js replace al function code example
Example 1: javascript replace
var res = str.replace("find", "replace");
Example 2: str replace javascript all
str.replace(/abc/g, '');
Example 3: javascript replaceall
//as of August 2020, not supported on older browsers
str.replaceAll("abc","def")