Deletes the element that has the same value as the specified value.
value | Value to delete |
all | Whether or not to target all |
It identifies and compares each element with the specified value (=== operator behavior) and removes the matching element.
Delete all, or if is false, delete only the first element found.
Otherwise, delete all found elements.