Skip to content

Instantly share code, notes, and snippets.

@moshekarmel1
Created October 16, 2015 16:41
Show Gist options
  • Save moshekarmel1/eba212301046ccb3b3cd to your computer and use it in GitHub Desktop.
Save moshekarmel1/eba212301046ccb3b3cd to your computer and use it in GitHub Desktop.
function checkForDupes(arr){
for(var i = arr.length - 1; i >= 0; i--){
if(arr.indexOf(arr[i]) !== i){
arr.splice(i,1);
}
}
return arr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment