In order to create a new array, slice is a shallow copy of the original array. By default, it takes two arguments, start and end, both of which are optional. Start represents the starting index position, which starts at 0 by default, end represents the ending index position, and there is no element at the end position in the sliced array. Splice: To add or delete items from an array. If there is no argument, it means that no element is deleted. If there is only one argument, it means that everything from this position, including this element, is deleted. If the two elements start at the position of the first argument, remove the second argument element. All that’s left is maybe three or more arguments, starting with the third argument and inserting all the following elements into it. If the position of the second argument is 0 or negative, no elements need to be removed.