function disemvowel(str) {
let аrrVowels =['a', 'e', 'i', 'o', 'u'];
for(let n =0; n<аrrVowels.length; n++){
str =str.replace(/аrrVowels[n]/gi, '');
}
return str;
}
let str = "asdfsdfsadfsadf lkjasdfasdaa asdf";
console.log(disemvowel(str));
let replace = '[aeuio]';
let regExp = new RegExp(replace, "gi");
function disemvowel(str) {
const vowels = ['a', 'e', 'i', 'o', 'u'];
return str
.split('')
.filter(char => !vowels.includes(char))
.join('');
}
console.log(disemvowel('Twinkle, twinkle, little star, How I wonder what you are.'));
// Twnkl, twnkl, lttl str, Hw I wndr wht y r.
let print = s => console.log(s);
function remove_vowels(s) {
let res = '';
for(let i of s) {
if(i != 'a' && i != 'e' && i != 'i' && i != 'o' && i != 'u') res += i;
}
return res;
}
let str = 'Twinkle, twinkle, little star';
print(remove_vowels(str));