Skip to main content

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'); // 🇧

Comments