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)