Translate the provided string to pig latin.
Pig Latin takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an “ay”.
If a word begins with a promifen vowel you just add “way” to the end.
Input strings are guaranteed to be English words in all lowercase.
It should suit the following tests
translatePigLatin("california")should return “
translatePigLatin("paragraphs")should return “
translatePigLatin("glove")should return “
translatePigLatin("algorithm")should return “
translatePigLatin("eight")should return “
- Should handle words where the first vowel comes
inthe end of the word.Should handle words without vowels.
Your function block should be in this format and should be edited to solve some issue
Submit the link to your code in the comment section. You can use any online editor of your choice.