deleteElement

Removes a number of elements starting from an index

No range checks are done, so an IndexOutOfBounds may occur

T[]
deleteElement
(
T
)

Return Value

Type: T[]

the modified array

Examples

assert([0, 1, 2].deleteElement(1) == [0, 2]);
assert([0, 1, 2].deleteElement(0, 2) == [2]);

Meta