Skip to content

Instantly share code, notes, and snippets.

@dan-laskowski
Created January 4, 2021 19:59
Show Gist options
  • Save dan-laskowski/9cfe68aaba63c6050250352b608727aa to your computer and use it in GitHub Desktop.
Save dan-laskowski/9cfe68aaba63c6050250352b608727aa to your computer and use it in GitHub Desktop.
[Sort users by descending follow count] #javascript #js #array #sort
let sortUsersByDescendingFollowCount = users.sort((a, b) => a.followers < b.followers ? 1 : -1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment