Henri Sivonen personal blog

It’s not wrong that "🤦🏼‍♂️".length == 7 (2019)

From time to time, someone shows that in JavaScript the .length of a string containing an emoji results in a number greater than 1 (typically 2) and then proceeds to the conclusion that haha JavaScript is so broken—and is rewarded with many likes. In this post, I will try to convince you that ridiculing JavaScript for…
Points
280
HN comments
844
Submissions
4
Cited by
10 commenters

Software EngineeringWeb & Frontend2023

On Hacker News

SubmittedTitle on HNPointsComments
Jun 2, 2023It’s not wrong that "🤦🏼‍♂️".length == 7 (2019) by triyambakam280303
Sep 9, 2019String Lengths in Unicode by panic230140
Aug 22, 2025It’s not wrong that "\u{1F926}\u{1F3FC}\u200D\u2642\uFE0F".length == 7 (2019) by program195274
Mar 26, 2021String length functions for single emoji characters evaluate to greater than 1 by kevincox116127

Cited in comments

Linked from 10 Hacker News comments by 10 different people, from Oct 2019 to Aug 2025.

Most recent:

Search every comment that links here →

More from Henri Sivonen

All 3 posts →

Related posts from the same era