
If either argument is negative, it specifies an array element relative to the length of the array. If only one argument is specified, the returned array contains all elements from the start position to the end of the array. The returned array contains the element specified by the first argument and all subsequent elements up to, but not including, the element specified by the second argument.

Its two arguments specify the start and end of the slice to be returned.

The slice() method returns a slice, or subarray, of the specified array. It's a simple method, but it can be really useful. The slice method is a way to extract a section of an array or a string.

If you're working with JavaScript, you're probably going to want to know how to use the slice method.
