DEV Community

Discussion on: 5 JavaScript "tips" that might bite you back.

 
eecolor profile image
EECOLOR

Did you read the comment of @josh to which I replied?

Granted, the spread operator being used in the returned array like this means you'll be generating copies upon copies upon copies, but you asked for an arity-agnostic refactor, not a performant one 😜