how to remove dash from string in javascript

Solutions on MaxInterview for how to remove dash from string in javascript by the best coders in the world

showing results for - "how to remove dash from string in javascript"
Matías
22 Apr 2019
1var str="185-51-671";
2var newStr = str.replace(/-/g, "");
3