Created
April 27, 2018 09:50
-
-
Save arrbxr/e01f9ef40aab229641eefe9a74471eab to your computer and use it in GitHub Desktop.
sort array with sort created by arrbxr - https://repl.it/@arrbxr/sort-array-with-sort
This file contains hidden or 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
| var array = [1, 12, 21, 2]; | |
| array.sort(function(a,b){ | |
| return b - a; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment