Created
January 4, 2021 19:59
-
-
Save dan-laskowski/9cfe68aaba63c6050250352b608727aa to your computer and use it in GitHub Desktop.
[Sort users by descending follow count] #javascript #js #array #sort
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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