Skip to content

Instantly share code, notes, and snippets.

@jezinka

jezinka/day4.js Secret

Created Jun 16, 2017
Embed
What would you like to do?
sorting if equals
return a.sort(function (a, b) {
if (o[b] !== o[a]) {
return o[b] - o[a];
}
return a.charCodeAt(0) - b.charCodeAt(0);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment