array.mid()
Extracts a sub array from an array.
array.mid( start=number, count=number )
Returns: Array
| Argument | Description |
|---|---|
|
start
number,
required
|
edit
The position of the first element to retrieve. |
|
count
number,
optional
|
edit
The number of elements to retrieve. If not set, all elements until the end of the array will be returned. |
Examples
editfruits = ["apple","orange","banana","orange","orange"];
writeDump(fruits.mid(2,3));
writeDump(fruits.mid(1,3));
writeDump(fruits.mid(3,8));