# array.mid()

Extracts a sub array from an array.

```
array.mid( start=number, count=number )
```

**Returns:** array

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| start | number | Yes | The position of the first element to retrieve. |  |
| count | number | No | The number of elements to retrieve. If not set, all elements until the end of the array will be returned. |  |

# Examples

```1
fruits = ["apple","orange","banana","orange","orange"];
writeDump(fruits.mid(2,3));
writeDump(fruits.mid(1,3));
writeDump(fruits.mid(3,8));
```

# Categories

[Arrays](../../../categories/array.md)

# See Also

[ArrayMid()](../../functions/arraymid.md), [Array](../array.md)