Created
October 26, 2018 16:16
-
-
Save corocoto/6178df4b23654ee10d90509b4085ce48 to your computer and use it in GitHub Desktop.
Сортировка чисел по возрастанию
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 numberArray=[60, 50, 62, 58, 54, 54]; | |
| numberArray.sort(compareNumbers); | |
| console.log(numberArray); | |
| function compareNumbers(num1, num2) { | |
| return num1-num2; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment