Hi! I’m trying to expand the functionality of my code for the Whale Talk exercise. What I want to do is the following.
- Remove all consonants from the input text, double the ‘E’ and ‘U’ letters (as per the project’s instructions)
The expanded functionality is
2. Maintain the spacings between words.
3. If a spacing appears at the start or the end of the translated text, remove it (for example if the first word is ‘my’, the code will not register the word and then record a space as the first entry into my resultArray array.
4. Similar to #3, if 2 spacings appear next to each other, delete one of the spacings.
What Im expecting to result from my code is:
The phrase: “hello to all of my friends” translates to “EEO O A O IEE”
However what I’m getting from my code is:
The phrase: “hello to all of my friends” translates to "EEO O A O "