Skip to content

Instantly share code, notes, and snippets.

@rloqvist
Created June 3, 2019 23:05
Show Gist options
  • Select an option

  • Save rloqvist/fa7014d2ee1ca56339d347fe8abe9637 to your computer and use it in GitHub Desktop.

Select an option

Save rloqvist/fa7014d2ee1ca56339d347fe8abe9637 to your computer and use it in GitHub Desktop.
data.sort((...rows) => rows.reduce((acc, cur) => -1 + Number(acc <= cur) + Number(acc < cur)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment