Creates a slice of array from start up to, but not including, end.
array
start
end
Note: This method is used instead of Array#slice to ensure dense arrays are returned.
Array#slice
5.6.0
var array = [1, 2, 3, 4]slice(array, 2)// => [3, 4]
The array to slice.
The start position. A negative index will be treated as an offset from the end.
The end position. A negative index will be treated as an offset from the end.
Returns the slice of array.
Creates a slice of
array
fromstart
up to, but not including,end
.Note: This method is used instead of
Array#slice
to ensure dense arrays are returned.5.6.0