function replace_string(string, pattern){
var st_pt = pattern.join('');
return string.replace(new RegExp(`[${st_pt}]`, 'gi'), '')
}
document.write(replace_string('Hello Vasiliy', ['l', 'a']))
function replace_string(string, pattern){
var st_pt = pattern.join('');
return string.replace(new RegExp(`[${st_pt}]`, 'gi'), '')
}
document.write(replace_string('Hello Vasiliy', ['l', 'a']))