Created
February 1, 2018 09:51
-
-
Save brownsmith/16ce91842f27d9129f95d279c94d0f9e to your computer and use it in GitHub Desktop.
Sort random numbers into descending order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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