Skip to content

Instantly share code, notes, and snippets.

@bostjanpisler
Created January 24, 2016 01:53
Show Gist options
  • Save bostjanpisler/b9dda8713c2451e7264c to your computer and use it in GitHub Desktop.
Save bostjanpisler/b9dda8713c2451e7264c to your computer and use it in GitHub Desktop.
js sort function
_sortRank(a, b) {
if (a.sumPoints > b.sumPoints) {
return -1;
} else if (a.sumPoints < b.sumPoints) {
return 1;
} else {
return 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment