const input = 'turpentine and turtles';
const vowels = ['a', 'e', 'i', 'o', 'u'];
let resultArray = [];
for ( let inputIndex = 0; inputIndex < input.length; inputIndex ++) {
for ( let vowel = 0; vowel < vowels.length; vowel ++
The posted code is incomplete. If you can still edit, update the post, else DM me the code and I’ll fix your post.
I believe you can state the question / goals that you want to achieve instead of posting half finished codes? If you can, do elaborate so the community can help.
Thanks!
It looks like we need to filter out the vowels and ignore the consonants.
let f = '';
for (let x of sentence) {
if ('aeiouAEIOU'.includes(x)) {
f += x
}
}
> let f = '';
<- undefined
> const sentence = 'A quick brown fox jumps over the lazy dog'
<- undefined
> for (let x of sentence) {
if ('aeiouAEIOU'.includes(x)) {
f += x
}
}
<- undefined
> f
<- 'Auioouoeeao'