Follow

who needs to check what EcmaScript mandates Array.protoype.sort() to be stable? Not me:

arr.sort((a,b) => (a.order - b.order) || a.name.localeCompare(b.name))

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.