js remove vowels from array of strings

JavaScript
[Edit]
+
0
-
0

js remove vowels from array of strings

1 2 3 4 5 6 7 8 9 10 11
function removeVowels(array) { return array.map(item => item.replace(/[aeiou]/g, '')); } // Usage example: const words = ['red', 'apple', 'dog']; const result = removeVowels(words); console.log(result); // ['rd', 'ppl', 'dg']