This modifies the original array, is this something we want? Or should it return a new object? Not being aware of the difference has caused some bugs occasionally, so whatever choice we make it should be made more clear with either a better name or better documentation.
This modifies the original array, is this something we want? Or should it return a new object? Not being aware of the difference has caused some bugs occasionally, so whatever choice we make it should be made more clear with either a better name or better documentation.