javascript - imacro filter spaces from string var -
i have string var
1111 2222 3333 4444 and want clear spaces , return
11112222233334444 im trying use
set !var1 eval(" parsefloat(\"{{!var2}}\") ") but returns 1, found following example, trying change usd /\s/g isn't working me
set !var1 eval("var s=\"{{!var2}}\"; s.replace(\"usd\",\"\"); ") js
string.replace(/\s/g, "");
you can split , join
var str = '1111 2222 3333 4444'; alert(str.split(' ').join(''))
Comments
Post a Comment