Skip to content

Instantly share code, notes, and snippets.

@brownsmith
Created February 1, 2018 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brownsmith/16ce91842f27d9129f95d279c94d0f9e to your computer and use it in GitHub Desktop.
Save brownsmith/16ce91842f27d9129f95d279c94d0f9e to your computer and use it in GitHub Desktop.
Sort random numbers into descending order
function descendingOrder(n){
return parseInt(String(n).split('').sort().reverse().join(''))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment