Shared: Why does "๐Ÿ‘ฉ๐Ÿพโ€๐ŸŒพ" have a length of 7 in JavaScript?

In short: ๐Ÿ‘ฉ๐Ÿพโ€๐ŸŒพ is made of 1 grapheme cluster, 4 scalars, and 7 UTF-16 code units. Thatโ€™s why its length is 7.

Interesting stuff.

Comments (0)

There are no comments to display.

Leave A Comment