-
-
Save codecademydev/ad34ee56fc6639be458fdd4d242ffc56 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let input = 'Hi, Human' | |
const vowels = ['a', 'e', 'i', 'o', 'u'] | |
let resultArray = [] | |
for (const words of input){ | |
//console.log(i) | |
for (const letters of vowels){ | |
if (words === letters){ | |
resultArray.push(words) | |
if (words === 'e' || words === 'u'){ | |
resultArray.push(words) | |
} | |
} | |
} | |
} console.log(resultArray.join('').toUpperCase()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment