Whale talk excercise pls Help

Hi could anyone help me with whale talk javascript exercise?
My code is:
Take a phrase like ‘turpentine and turtles’ and translate it into its “whale talk” equivalent: ‘UUEEIEEAUUEE’.

There are a few simple rules for translating text to whale language:

  1. There are no consonants. Only vowels excluding “y”.
  2. The u ‘s and e ‘s are extra long, so we must double them in our program.

let input = “Hi human”

const vowels = [‘a’, ‘e’, ‘i’, ‘o’, ‘u’];

const resultArray =;

for (let i = 0; i < input.length ; i++){

for (let b = 0; b < vowels.length; b++){

 if(input[i] === vowels[b]){

   if (input[i] = 'e'){        



    else if (input[i] = 'u'){



    else {







Hello @mihailruhasoo, what is going wrong here? Have you identified the issue? As far as I can see, the issue is with this:

You have an assignment sign (=) when you should have an equality operator (===).
I hope this helps!

1 Like