r/learnjavascript • • May 14 '21

Remove Duplicate Value from array

Post image
234 Upvotes

89 comments sorted by

View all comments

2

u/devbrk May 14 '21

So how really does it work? I mean I assume that we can’t use it in an interview.

2

u/suprabha-supi May 14 '21

What I have seen, interviews always ask multiple ways.

In those we have different ways:

  1. Using Set

  2. Array.from

  3. filter

  4. reduce

  5. forEach

1

u/suprabha-supi May 14 '21

I have added few ways which we can use to remove duplicate values from an array:

https://blog.suprabha.me/57-remove-duplicate-from-array