Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created December 3, 2021 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/ad34ee56fc6639be458fdd4d242ffc56 to your computer and use it in GitHub Desktop.
Save codecademydev/ad34ee56fc6639be458fdd4d242ffc56 to your computer and use it in GitHub Desktop.
Codecademy export
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