I’ve managed to find most of my mistakes, but I’m unable to figure out what I’m doing wrong with the output. I’ve checked my code line by line with the video walkthrough and I can’t see any discrepancy.
let 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++){
if (input[inputIndex] === vowels[vowel]){
if (inputIndex[inputIndex] === ‘e’){
resultArray.push(‘ee’);
} else if (inputIndex[inputIndex] === ‘u’){
resultArray.push(‘uu’);
} else {
resultArray.push(input[inputIndex]);
}
}
}
}
console.log(resultArray.join(’’).toUpperCase());
Any help would be greatly appreciated.