매일매일개발/Codewars

codewars #62 Simple Pig Latin (5kyu)

개하싶 2018. 6. 18. 13:26

#62 Simple Pig Latin


 to the end of it, then add "ay" to the end of the word. Leave punctuation marks untouched.


Examples

pigIt('Pig latin is cool'); // igPay atinlay siay oolcay

pigIt('Hello world !');     // elloHay orldWay !