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
idarray<any>: The array; na stops the script with a runtime error.index_fromint: First position copied; negative counts from the end. Outside or na stops the script with a runtime error.index_toint: Position after the last one copied (default: the size); before index_from stops the script with a runtime error.
Example
firstTwo = a.slice(0, 2)