Hello Somebody could help me. Whats wrong with my code? It doesn’t print, the webbrowers crashes.
let input = 'wie ben jij';
const vowels = ['a', 'e', 'i', 'o', 'u'];
let resultArray= [];
for (let inputIndex = 0; inputIndex < input.length; inputIndex++){
for (let vowel = 0; vowels.length; vowel++){
if (input[inputIndex] === vowels[vowel]){
if (input[inputIndex] === 'e'){
resultArray.push('ee')
} else if(input[inputIndex] === 'u'){
resultArray.push('uu')
}
else {
resultArray.push(input[inputIndex]);
}
}
}
}
console.log(resultArray);