Created
June 20, 2021 10:20
-
-
Save Andrii-Yukhymenko/3bdb2f8b5e686aa2f1bbb18dd68b1993 to your computer and use it in GitHub Desktop.
Сортировка числового массива по возростанию.
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
let arr = [2, 3, 555, 38, 58]; | |
arr.sort(function (a, b) { | |
return a - b; | |
}); | |
console.log(arr); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment