array.slice

A new array with a copy of the elements from index_from up to, not including, index_to (default: the size). Unlike some languages this is a copy: changing it does not change the original.

array.slice(id: array<any>, index_from: int, index_to: int = na) -> array<any>

Parameters

Example

firstTwo = a.slice(0, 2)