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.
The splice() method changes the contents of an array by removing or replacing existing elements and/or adding new elements in place