Skip to content

Latest commit

 

History

History

simplePigLatin

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Simple Pig Latin

5 kyu link to kata
my solution

Move the first letter of each word 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 !