[ad_1]
Add the global selection “g” flag and use a regex instead of a string in first parameter.
result = text.replace(/\//g, "");
3
[ad_2]
solved why does str.replace() only replace the first found item?
[ad_1]
Add the global selection “g” flag and use a regex instead of a string in first parameter.
result = text.replace(/\//g, "");
3
[ad_2]
solved why does str.replace() only replace the first found item?