The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Create a Shallow Copy of an Array with Slice

Create a Shallow Copy of an Array with Slice

9:15
Array slice creates a shallow copy of an array. In this lesson we cover, in detail, exactly what a 'shallow' copy is and how it can trip people up. We go on to look at examples that show to how to copy only the first item, the last item and even how to copy a sub-section of an array excluding the first and last. We end the lesson with a practical example that shows how `slice` fits into a workflow that contains other array methods such as `map` & `reduce`.
Watch this lesson now
Avatar
egghead.io

Array slice creates a shallow copy of an array. In this lesson we cover, in detail, exactly what a 'shallow' copy is and how it can trip people up. We go on to look at examples that show to how to copy only the first item, the last item and even how to copy a sub-section of an array excluding the first and last. We end the lesson with a practical example that shows how slice fits into a workflow that contains other array methods such as map & reduce.

Avatar
Joshua

pretty cool. like this.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?