Today is Emoji day, and I'd like to share something I learned about emojis that blew my mind! 🤯
Did you know that the 👨💻 "Man Technologist" emoji (aka developer) is created by combining other two emojis? 👨 "Man" & 💻 "Laptop"
These types of emojis are called Compound emoji, and they exist thanks to a non-printable character called the "Zero Width Joiner" (\u200D
), which is used to merge two or more emojis.
So the final equation is: 👨 + ZWJ + 💻 = 👨💻
You can see it clearly if you use the spread operator on the emoji string!
const compoundEmoji = '👨💻';
const explodedEmoji = [...compoundEmoji];
console.log(explodedEmoji);
// ['👨', '', '💻']
// The second element is the unicode character ZWJ
I've created a stackblitz demo where you can play with emojis in JavaScript
Check out also these useful links:
Top comments (0)