Skip to content

Instantly share code, notes, and snippets.

@stevewithington
Created May 22, 2019 04:42
Show Gist options
  • Save stevewithington/3695c54653c6840142effd3762d39ca4 to your computer and use it in GitHub Desktop.
Save stevewithington/3695c54653c6840142effd3762d39ca4 to your computer and use it in GitHub Desktop.
JavaScript Compare
compare(a: number, b: number): number {
return a > b
? 1
: a < b
? -1
: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment