Removes the first element from an Array that is equal to a value.
Delete the first element equal to 2
2
const array = [1, 2, 3, 2];deleteFirst(2)(array);console.log(array); // [1, 3, 2]
true if an element was deleted, otherwise false
true
false
the Array element type
the value to delete from the Array
Optional
Generated using TypeDoc
Removes the first element from an Array that is equal to a value.
Mutation
Example
Delete the first element equal to
2Returns
trueif an element was deleted, otherwisefalse