Not printing the 'u'


#1

I followed the directions and I originally was using an else if statement to literate through ‘u’ as well which didn’t work so I tried the hint and found out about the ||. Now that I have added it, it’s not going through the iterations:

let input = "turpentine and turtles!";
let vowels = ['a', 'e', 'i', 'o', ' u', 'y'];
let resultArray = [];

for (let inputIndex = 0; inputIndex < input.length; inputIndex++) {
  if (input[inputIndex] === 'e' || input[inputIndex] === 'u') {
     resultArray.push(input[inputIndex]) }
  for (let vowelsIndex = 0; vowelsIndex < vowels.length; vowelsIndex++)
 {
    if (input[inputIndex] === vowels[vowelsIndex]) {
    	resultArray.push(vowels[vowelsIndex]);
    }
  }
}

console.log(resultArray.join('').toUpperCase());

#2

let vowels = ['a', 'e', 'i', 'o', ' u', 'y'];

contains a space before u