Could you take a look at my code bellow?


#1

Hello!
I did everything I could, and my code still does not run through. Coul you take a look at my code bellow? It keeps returning syntax erros or nothing. Thanks!

let input = "Good morning";
input = input.toLowerCase();

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

let resultArray = [];

for (let inputIndex = 0; inputIndex < input.lenght; inputIndex++) {
  console.log('Input index is ' + inputIndex);
  for (let vowelsIndex = 0; vowelsIndex < vowels.lenght; vowelsIndex++) {
  console.log('Vowels index is ' + vowelsIndex);
    if(input[inputIndex] === vowels[vowelsIndex]){
      resultArray.push(input[inputIndex]);
    }
  }
  	if(input[inputIndex] === 'e' || input[inputIndex] === 'u') {
      resultArray.push(input[inputIndex]);
    }
};
console.log(resultArray.join('').toUpperCase());

Help with my javaScript "Whale Talk" project
#2

This spelling error shows up twice in the above code sample.


#3

You have such good eyes, I will never forget that correct speling again, thanks!