DEV Community

[Comment from a deleted post]
 
ortonomy profile image
🅖🅡🅔🅖🅞🅡🅨 🅞🅡🅣🅞🅝

Oh, I know you said you don't agree. And I don't agree. Like you said, your point of view.

Given that the definition of slice is to copy the array and should be used as such, I would expect it to be easier to understand, than say, using the spread operator, which is while is your preferred method, respectfully I disagree it's the clearest.

the filter method is used for a boolean comparison on condition and whilst it's a novel usage, is also not clear that it is being used to delete an item and would require inspection of code

Your original comment was about not using splice, I said it's fine. That's all I came here to say.

I mean, I appreciate you fancy use of currying to create ANY condition for deletion, but the original post was about deleting an object an index.