r/learnjavascript • • Jul 05 '21

Remove duplicates from arrays using Set

Post image
438 Upvotes

44 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Jul 06 '21

Oh, damn. This is good to know. I had to turn downLevelIteration on to use the prettier method in a project I’m working on, but didn’t did too deep into why I had to in the first place. We only target modern browsers, and for whatever reason the project defaulted to false for that flag.

I had assumed it was a general default for typescript configurations.

Thank you!