// Return an array of all words that begin with a vowel in the given array
const randomWords = ["Nedy", "Adesoji", "Akaniru", "Umbrella", "Barcelona", "Xylophone"];
const startWithVowelWords = randomWords.filter((random_word) => {
const vowels = ["a", "e", "i", "o", "u"];
return vowels.includes(random_word.toLowerCase().substring(0,1))
});
// Return an array of all words that begin with a vowel in the given array
const randomWords = ["Nedy", "Adesoji", "Akaniru", "Umbrella", "Barcelona", "Xylophone"];
const startWithVowelWords = randomWords.filter((random_word) => {
const vowels = ["a", "e", "i", "o", "u"];
return vowels.includes(random_word.toLowerCase().substring(0,1))
});
Nice solution @pavilandoangelo 👍