Whale Talk

Hello, I am posting after comparing my code to a solution but still can not find the difference causing mine to work incorrectly…
input = 'hi humans' should log IUUA
instead mine is logging AUEIOAUU with input = 'hi humans' and it logs AOEIAOUU with input = 'hi, humans'
Any help is greatly appreciated!

https://www.codecademy.com/paths/front-end-engineer-career-path/tracks/fecp-javascript-syntax-part-ii/modules/fecp-learn-javascript-syntax-loops/projects/whale-talk

Hi @core2761115992

Here you are comparing the sentence (input) letters with other letters of that sentence, instead of comparing them with the vowel array.

oh my goodness!! I believe i had it as vowels[j] at some point and changed it because it wasn’t working originally (due to other part being wrong) so I was trying different stuff. Welp thats embarrassing! thank you

1 Like