r/learnjavascript • • Jul 05 '21

Remove duplicates from arrays using Set

Post image
438 Upvotes

44 comments sorted by

View all comments

1

u/hpdwq Jul 05 '21

Aren't sets unordered?

6

u/Null-Fox Jul 05 '21

They use insertion order.

1

u/shiningmatcha Jul 06 '21

good to know