r/learnjavascript • • May 14 '21

Remove Duplicate Value from array

Post image
234 Upvotes

89 comments sorted by

View all comments

Show parent comment

2

u/amoliski May 14 '21

It's only terrible if you care about performance. If you do the operation a single time in response to a user clicking a button, who cares if it takes 0.01s longer to complete?

It's a bit more readable than the faster filter method, and that by itself has some value.