Removes elements of an Array at a given index
Delete a single element at index 1
const array = [1, 2, 3];deleteAt(1)(array);console.log(array); // [1, 3]
Delete two elements at index 1
const array = [1, 2, 3, 4];deleteAt(1, 2)(array);console.log(array); // [1, 4]
true if an element was deleted, otherwise false
true
false
the index to start deletion
the optional number of elements to delete
Generated using TypeDoc
Removes elements of an Array at a given index
Mutation
Example
Delete a single element at index 1
Example
Delete two elements at index 1
Returns
trueif an element was deleted, otherwisefalse