javascript - How To Do Two Times String Charachets Replace/Remove at Once -
i have text string "1,000 kw" as
var result = "1,000 kw"
can please let me know how can clean display 1000 on 1 line? tried replace() as:
var res1 = result.replace(',',''); var res2 = res1.replace(' kw',''); alert(res2);
which working need have code in 1 line. thanks
Comments
Post a Comment