less than 1 minute read

Can you guess, what will be the output 'πŸ‘©β€πŸ‘©β€πŸ‘§β€πŸ‘§'.length // ??

It is 11.

What about this one: ['☺', 'πŸ˜€', '1️⃣', 'πŸ‡¦πŸ‡¨', 'πŸ‘±β€β™‚οΈ', 'πŸ‘©β€β€οΈβ€πŸ‘¨', 'πŸ‘©β€πŸ‘©β€πŸ‘§β€πŸ‘§'].map((emoji) => emoji.length)?

Well, here it goes: [1, 2, 3, 4, 5, 8, 11].

My favorite two examples look like marriage and divorce:

['πŸ‘¨', '‍', 'πŸ‘©'].reduce((cur, next) => cur += next) // πŸ‘¨β€πŸ‘©

[...'πŸ‘¨β€πŸ‘©β€πŸ‘§']   // ['πŸ‘¨', '‍', 'πŸ‘©', '‍', 'πŸ‘§']

I’ve group every emoji by its length, so you don’t have to https://github.com/FSou1/EmojiGroupedByLength.

Happy Friday.

More theory: https://gomakethings.com/emoji-are-still-weird-but-modern-browser-methods-help/