Created
January 13, 2019 16:51
-
-
Save alegut/d9ef5ece0daaf74a0d142e9b81f8b401 to your computer and use it in GitHub Desktop.
JS sorting numbers
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
const sorted = [4,78,6,-8].sort((a,b) => a - b); | |
console.log(sorted); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment