Please note .. this is not the complete rules for PigLatin ..
For words that begin with consonant sounds, the consonant before the initial vowel should be moved to the end of the word sequence and "ay" affixed. E.g
"pig" = "igpay"
For words that begin with consonant clusters, the clusters should be moved to the end of the word sequence and "ay" affixed. E.g
"glove" = "oveglay"
For words that begin with vowel sounds, simply add "way" to the end of the word. E.g
"explain" = "explainway”
Please note .. this is not the complete rules for PigLatin ..
Have a look at scotch.io/courses/the-ultimate-gui...
Yes, i've taken it from CodeWars, that's why it's called 'Simple Pig Latin', it's a simpler version.