DEV Community

San
San

Posted on

Remove qouma and put space in string js

Remove qouma and put space in string js

const str = 'apple,ball,cat';

const withoutCommas = str.replaceAll(',', ' ');
console.log(withoutCommas); // 👉️ 'apple ball cat'
Enter fullscreen mode Exit fullscreen mode

Top comments (0)