Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

JS - to remove all similar character from a string

0 votes
62 views
added Mar 18 in Javascript by lcjr First Warrant Officer (8,030 points)
edited Jul 25 by lcjr
const brandPath = path_arr[2];
// e.g lazacode-org
const brandName = brandPath.replace(/-/g,' ');

console.log(brandName);
// will output lazacode org

 

Please log in or register to response this reference.

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...