-
-
Save theasder/55805933c42a1c68b6b2 to your computer and use it in GitHub Desktop.
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
function removeDuplicates(arr) { | |
oldLength = arr.length; | |
arr = arr.filter(function(item, pos, self) { | |
return self.indexOf(item) == pos; | |
}); | |
return oldLength - arr.length; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment