[ad_1]
Just change your two replaces to this:
var newstr=str.replace(/[+-]/g,"");
[ad_2]
solved How do I replace all occurrences of + – with javascript? [closed]
[ad_1]
Just change your two replaces to this:
var newstr=str.replace(/[+-]/g,"");
[ad_2]
solved How do I replace all occurrences of + – with javascript? [closed]