Skip to content

Instantly share code, notes, and snippets.

@alexeisavca
Created July 11, 2015 07:59
Show Gist options
  • Save alexeisavca/fa409dc940c30361e7df to your computer and use it in GitHub Desktop.
Save alexeisavca/fa409dc940c30361e7df to your computer and use it in GitHub Desktop.
JS head and tail
function head(arr){
return arr.slice(0, 1);
}
function tail(arr){
return arr.slice(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment