Pig Latin Converter in JS