Created
March 25, 2019 17:18
-
-
Save noximus/dcc8a71d9cd508bb0c2f6dba05c797c6 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
function copyAndSortNumbers(numbers) { | |
return numbers.concat().sort(); | |
} | |
/* Do not modify code below this line */ | |
const original = [1, 7, 3, 5]; | |
const sortedCopy = copyAndSortNumbers(original); | |
console.log(original, '<-- should be [1, 7, 3, 5]'); | |
console.log(sortedCopy, '<-- should be [1, 3, 5, 7]'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment