Created
July 4, 2016 13:23
-
-
Save daredrum/7e09d9fc30eda2403e55e84cb6c01ad9 to your computer and use it in GitHub Desktop.
Array techniques
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
| 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