Created
August 13, 2025 08:11
-
-
Save gabri83/096f2c03580f6c2d8a6f06dc7decd202 to your computer and use it in GitHub Desktop.
Sorting an Array of Numbers (JavaScript)
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 numbers = [5, 2, 9, 1]; | |
| numbers.sort((a, b) => a - b); | |
| console.log(numbers); // [1, 2, 5, 9] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment