slice(start?, end?)

Returns an array of the values contained in the half-open interval [start, end), that is, including the start and excluding the end.

For Array, List, and Deque, both terms may be numeric positive or negative indicies.

For a List, either term may be a node.

On collections

Usage

  • slice()
  • slice(start)
  • slice(start, end)

Related