Fabio Manganiello on Nostr: In today’s episode of “#Javascript never returns you what you’d expect from ...
In today’s episode of “#Javascript never returns you what you’d expect from it”: numeric sorting.
❯ [1, 11, 4, 3, 2].sort()
Array(5) [ 1, 11, 2, 3, 4 ]
npub1lhngm68szjfcqr6yptylfnupq3dyajl7h56j05zdwhllf7e0ezdsgss0mj (npub1lhn…s0mj)
❯ [1, 11, 4, 3, 2].sort()
Array(5) [ 1, 11, 2, 3, 4 ]
npub1lhngm68szjfcqr6yptylfnupq3dyajl7h56j05zdwhllf7e0ezdsgss0mj (npub1lhn…s0mj)