Skip to content

Instantly share code, notes, and snippets.

@gmgent
Created March 8, 2011 18:22
Show Gist options
  • Save gmgent/860699 to your computer and use it in GitHub Desktop.
Save gmgent/860699 to your computer and use it in GitHub Desktop.
function unique(a)
{
var r = [];
o:for(var i = 0, n = a.length; i < n; i++) {
for(var x = i + 1 ; x < n; x++)
{
if(a[x]==a[i]) {continue o;}
}
r[r.length] = a[i];
}
return r;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment