Last active
June 7, 2021 19:49
-
-
Save MauricioRobayo/e760a42c9f55ee493a608bf9073d3718 to your computer and use it in GitHub Desktop.
slice.js #gogofast
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
| The slice() method returns a shallow copy of a portion of an array into a new array object selected from start to end (end not included) where start and end represent the index of items in that array. The original array will not be modified. | |
| slice() | |
| slice(start) | |
| slice(start, end) |
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
| The splice() method changes the contents of an array by removing or replacing existing elements and/or adding new elements in place. | |
| splice(start) | |
| splice(start, deleteCount) | |
| splice(start, deleteCount, item1) | |
| splice(start, deleteCount, item1, item2, itemN) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment