Skip to content

Instantly share code, notes, and snippets.

@daredrum
Created July 4, 2016 13:23
Show Gist options
  • Select an option

  • Save daredrum/7e09d9fc30eda2403e55e84cb6c01ad9 to your computer and use it in GitHub Desktop.

Select an option

Save daredrum/7e09d9fc30eda2403e55e84cb6c01ad9 to your computer and use it in GitHub Desktop.
Array techniques
var arr = [1,2,3,4,5,6,7,8,9,10];
var arr2 = arr.slice(0, 3); // => arr2 = [1,2,3]
var arr3 = arr.splice(0, 3); // => arr3 = [1,2,3] arr = [4,5]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment