Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • The documentation text does not match the implementation: The implementation only removes the first instance, but the documentation says all instances of itemToRemove. The documentation says a new array is returned, but when there is no element to remove, the original array is returned instead of a new one, which might lead to inconsistencies if the result gets modified. Commented Jun 13, 2024 at 17:37