Last active
November 8, 2018 13:52
-
-
Save anish000kumar/c1fc31e549bf4f85184240ead5d31f36 to your computer and use it in GitHub Desktop.
Sort array of numbers
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
numArray.sort((a, d) => a - d); // For ascending sort | |
numArray.sort((a, d) => d - a); // For descending sort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment