Last active
October 31, 2019 12:06
-
-
Save pSapien/6ac70d53899f6fe88565947e7e690031 to your computer and use it in GitHub Desktop.
remove first element of an array.
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
/** | |
* @params{array} | |
* remove first element of an array. | |
* removeFirst([4,46,312,12313,123123]) => [46, 312, 12313, 123123] | |
*/ | |
function removeFirst(arr) { | |
return arr.slice(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment