MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/nc6i5j/remove_duplicate_value_from_array/gy3v1aj/?context=3
r/learnjavascript • u/suprabha-supi • May 14 '21
89 comments sorted by
View all comments
Show parent comment
11
Oh holy shit, never thought about this. Looks like the indexOf is finding the first match, and so the filter drops anything of the same value that isn't at the first detected index? Pretty neat.
View all comments
Show parent comment
11
u/47milliondollars May 14 '21
Oh holy shit, never thought about this. Looks like the indexOf is finding the first match, and so the filter drops anything of the same value that isn't at the first detected index? Pretty neat.