Created
July 13, 2017 21:26
-
-
Save bitburnerz/780415697fd8d24a6399eac6b26c82e9 to your computer and use it in GitHub Desktop.
JS Bin [add your bin description] // source https://jsbin.com/yevayit
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="description" content="[add your bin description]"> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> | |
| var numbers = [1, 9, 5, 55, 15, 19, 0, 23]; | |
| console.log(numbers.sort()); // [0, 1, 15, 19, 23, 5, 55, 9] | |
| console.log(numbers.sort( | |
| function(first, second) { | |
| return first - second; | |
| } | |
| )); // [0, 1, 5, 9, 15, 19, 23, 55] | |
| </script> | |
| <script id="jsbin-source-javascript" type="text/javascript">var numbers = [1, 9, 5, 55, 15, 19, 0, 23]; | |
| console.log(numbers.sort()); // [0, 1, 15, 19, 23, 5, 55, 9] | |
| console.log(numbers.sort( | |
| function(first, second) { | |
| return first - second; | |
| } | |
| )); // [0, 1, 5, 9, 15, 19, 23, 55]</script></body> | |
| </html> |
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 numbers = [1, 9, 5, 55, 15, 19, 0, 23]; | |
| console.log(numbers.sort()); // [0, 1, 15, 19, 23, 5, 55, 9] | |
| console.log(numbers.sort( | |
| function(first, second) { | |
| return first - second; | |
| } | |
| )); // [0, 1, 5, 9, 15, 19, 23, 55] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment