Created
April 19, 2016 23:37
-
-
Save asleepwalker/8c54827b403e0d7454a15bf5ef0c8644 to your computer and use it in GitHub Desktop.
Remove duplicates from JavaScript array
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
var unique = arr.filter(function(item, index) { | |
return arr.indexOf(item) == index; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment