Pull
Takes the element at an index out of an array.
Node id array/pull
The Pull node has two outputs: element, the element of array at
index, and array, a new array with every other element, in order.
Inputs
| Name | Type | Default | Notes |
|---|---|---|---|
| array | Array<T> | — | generic |
| index | number | 0 |
Outputs
| Name | Type | Notes |
|---|---|---|
| element | T | generic |
| array | Array<T> | generic |
Behaviour
- Indices work as in Get: the first element is at 0, and negative indices count from the end (-1 is the last element).
- A new array. The connected array is unchanged.
Errors
indexmust be a whole number, inside the array (as for Get). An empty array has no element to pull.