GitHub 6248★

Convert a letter to associate emoji

JavaScript version

const letterToEmoji = (c) => String.fromCodePoint(c.toLowerCase().charCodeAt(0) + 127365);

TypeScript version

const letterToEmoji = (c: string): string => String.fromCodePoint(c.toLowerCase().charCodeAt(0) + 127365);

Examples

letterToEmoji('a'); // 🇦
letterToEmoji('b'); // 🇧
Follow me on and to get more useful contents.