The Javascript example explains: This example uses the Slice (start, [end]) method of the Array object. This method returns a new Array, contains the elements specified by the source function from start to end, but does not include the end element, such as. slice (); If start is negative, it is processed as length + start. Here, length is the length of the array, such as. slice (-3, 4), equivalent to. slice (2, 4 ). If end is negative, it is processed as length + end. Here, length is the length of the array, for example, a. slice (0,-1 ). If end is omitted, the slice method will always be copied to the end of the source array, for example, a. slice (1 ). If end appears before start, no elements are copied to the new array, such as a. slice ).
<Html> <pead> <title> use the slice Method to return a Javascript example of part of the array </title> </pead> <body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]