Last active
December 4, 2016 18:01
-
-
Save oscarmorrison/e0f76f0e8237a0c3bf936f2b34422754 to your computer and use it in GitHub Desktop.
Unique Array
This file contains 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 uniqueArray = function(array) { | |
return array.filter(function (item, pos) { | |
return array.indexOf(item) == pos; | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment