Skip to content

Instantly share code, notes, and snippets.

@yeco
Created March 11, 2010 17:11
Show Gist options
  • Select an option

  • Save yeco/329361 to your computer and use it in GitHub Desktop.

Select an option

Save yeco/329361 to your computer and use it in GitHub Desktop.
function eliminarDuplicados(a) {
var idx = {}, ai, o=[];
for(var i = 0, l = a.length; i < l; i++){
ai = a[i];
if(!idx[ai]){
o.push(ai);
idx[ai] = true;
}
}
return o;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment