Skip to main content

ArrayRemoveItemAt

Takes an array and removes the element at the position defined in the Index field, returning a new array without that element. The index is zero-based, meaning the first element is at position 0.

Reference

Parameters

array

The array from which the element will be removed.

Component data2-core-types@Getter

index

The zero-based position of the element to remove.

Component data2-core-primitives@Number

Example

Input

[1, 2, 3, 4, 5]

Index: 2

Output:

[1, 2, 4, 5]

Note: If the Index field is left empty, it will default to 0, removing the first element of the array.