cpt-waffle-lotide
Version:
LoTide in Typescript
13 lines (12 loc) • 375 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const pigLatin = (string) => {
const words = string.split(' ');
const result = words.map((word) => {
const firstLetter = word[0];
const subWord = word.slice(1);
return subWord + firstLetter + 'ay';
});
return result.join(' ');
};
exports.default = pigLatin;