Skip to content

Instantly share code, notes, and snippets.

@benjamn
Created June 23, 2009 23:59
Show Gist options
  • Save benjamn/134924 to your computer and use it in GitHub Desktop.
Save benjamn/134924 to your computer and use it in GitHub Desktop.
function diff(a, b) {
[].sort.call(arguments);
return b - a;
}
console.log(diff(3, 5));
console.log(diff(5, 3));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment