text = "Hello,world"
newText = '';
if (text.includes(',')) {
for (let j = 0; j < text.length; j++) {
if (text[j] !== ',') {
newText += text[j];
}
else {
newText += ' ';
}
}
}