Last active
September 27, 2021 12:42
-
-
Save ahafidi/284376ebef01c24bc70fc1b0993d9f47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const arr = [1, 2, 1, 2, 3, 3, 4, 5] | |
arr.filter((e, i) => arr.indexOf(e) !== i) | |
// returns [1, 2, 3] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment