Last active
January 13, 2020 14:46
-
-
Save sandrabosk/d80e17e2ebeed01d4b07b9b27ead5b36 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
const source = [1,2,3,4,5,6,7,8,9,10]; | |
function removeFirstTwo(list) { | |
// change code below this line | |
const [a,b,...arr] =list // change this | |
// change code above this line | |
return arr; | |
} | |
const arr = removeFirstTwo(source); | |
console.log(arr); // should be [3,4,5,6,7,8,9,10] | |
console.log(source); // should be [1,2,3,4,5,6,7,8,9,10]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment