Defined
The splice () method is used to insert, delete, or replace elements of an array.
The slice () method extracts a portion of a string and returns the extracted part with a new string.
Usage
Splice Parameters :splice (Start, DeleteCount, [item1[, item2[, ... [, Itemn]]])
The array starts with the start subscript, deletes deletecount elements, and can begin adding n elements at this position
When start, DeleteCount is 0, the new element is inserted at the front of the array.
When the parameter only Start,deletecount is the element that deletes the DeleteCount array from the start subscript,
When the parameter has only the start parameter, it deletes the element from the start subscript to the last
When the parameter is negative, the parameter specifies the position from the end of the array element (-1 refers to the penultimate element in the array, and 2 refers to the second-to-last element in the array). )
Slice parameter: Slice (start,end);
The slice method is similar to the use of the string object and the array object.
For an array object, the slice method extracts a segment of the element (but not the end subscript element) from start that is labeled end With end, and then returns a new array that has no effect on the original array.
When the argument is negative, the argument starts at the end of the array, (1 refers to the first-to-lastelement in the array, and 2 refers to the second-to-last element in the array.) )
When the argument is a parameter, when it is a parameter, the extraction is the part of the element that is labeled start to the end.
When start is 0 o'clock, it is said to be cloning a new array, and the two arrays are cloned to perform their respective operations,
var clone = array.slice (0);
The difference between the slice () method and the Splice method ...