# slice

    container slice(container, startIndex, endIndex)

Returns a portion (subsection) of container.

- An array container returns a new array with the elements from startIndex through endIndex.
- A text container returns a text with the characters from startIndex through endIndex.

## Arguments

1. container — array or text return a subsection of.
2. startIndex — optional index (inclusive) of first element or character. 0 if omitted.
3. endIndex — optional index (exclusive) of last element or character. Length of container if omitted.

## Returns

- a subsection of container.