What does Array.prototype.slice() do?
- A Removes elements from the array in place
- B Returns a shallow copy of a portion of the array without modifying it
- C Sorts the array
- D Joins array elements into a string
Answer
Returns a shallow copy of a portion of the array without modifying it
slice is non-mutating and returns a new array. splice, by contrast, modifies the original array in place.





