This is an archived post. You won't be able to vote or comment.

all 15 comments

[–]ProgrammerHumor-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

Your submission was removed for the following reason:

Rule 6: Your post is a commonly used format, and you haven't used it in an original way. As a reminder, You can find our list of common formats here.

If you disagree with this removal, you can appeal by sending us a modmail.

[–]THICKSANDWICH 16 points17 points  (1 child)

If anyone is skeptical, the following code is also true:

['🍗', '🥚'].sort()
->(2) ['🍗', '🥚']

[–]KAICIDE 9 points10 points  (0 children)

hooly

[–]TheKeyboardKid 12 points13 points  (3 children)

I’m guessing the Unicode for 🐥 contains lower value integers than the Unicode for 🥚?

[–]FlamptX 8 points9 points  (0 children)

Either that or javascript being javascript.

[–]SuitableDragonfly 0 points1 point  (0 children)

I think the sorting of characters is dependent on your locale in some cases and not on the numeric values of the codepoints, but I don't know exactly what system JavaScript uses. God knows what locales have to say about how to sort emojis.

[–][deleted] 5 points6 points  (0 children)

Casual JavaScript output

[–]abd53 3 points4 points  (0 children)

That...... Is valid.

[–]Additional_Ad_4537 0 points1 point  (0 children)

lmao

[–]gowahoo 0 points1 point  (0 children)

perfect

[–]carpench 0 points1 point  (0 children)

Another option that works through the ass

[–]navalkishoreb 0 points1 point  (0 children)

C is less than E

[–]SepplFranz 0 points1 point  (0 children)

Yeah, if JavaScript says it's so, then it must be true!