function removeSpecificCharactersFromString(str, charsToRemove) {
for (const ch of charsToRemove) {
str = str.replace(new String(ch).toString(), "");
}
return str;
}
let phone = "(333) 333-3333";
const charsToRemove = ['(', ')', '-'];
phone = removeSpecificCharactersFromString(phone, charsToRemove);
console.log(phone);
/*
run:
333 3333333
*/