Visual mnemonic for an array sorter's return values
Published on in JavaScript and Mnemonics
When sorting an array with a custom comparator function,
the function should return <0
, 0
or >0
.
But what do the values do?
Use this weird visual mnemonic –
sorting consultants HATE it!