---
title: "subarray"
canonical: "https://support.appfire.com/space/PSJC/433000601/subarray"
format: markdown
---
> Macro (aura-html)


## Description

> Macro (excerpt)
> 
> Returns an array starting with index 'start' and ending at index 'end'.

Returns an array starting with index 'start' and ending at index 'end'.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | subarray(arr, start, end) | **Package** | array |
| **Alias** |  | **Pkg Usage** | subarray(arr, start, end) |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| arr | Array | Yes | Array. |
| start | Number | Yes | Start index. |
| end | Number | Yes | Stop index. |

## Return Type

**Array**

## Example

```javascript
string [] firstFollowers = subarray(watchers, 1, 3); //assume the length of watchers>= 3
```

## See also

> Macro (contentbylabel)