js replace all [] code example
Example 1: str replace javascript all
str.replace(/abc/g, '');
Example 2: javascript replaceall
//as of August 2020, not supported on older browsers
str.replaceAll("abc","def")
str.replace(/abc/g, '');
//as of August 2020, not supported on older browsers
str.replaceAll("abc","def")