Revision: 59205
Updated Code
at August 23, 2012 23:16 by guilhermehn
Updated Code
function unique(arr, dup) { dup = dup ? arr.concat() : arr; for(var i = 0; i < dup.length; i++) if(dup.indexOf(dup[i]) < i) dup.splice(i--); return dup; }
Revision: 59204
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at August 23, 2012 23:01 by guilhermehn
Initial Code
function unique(arr,dup) { dup = dup ? arr.concat() : arr; for (var i=0; i < dup.length; i++) if (dup.indexOf(dup[i]) < i) dup.splice(i--); return dup; }
Initial URL
Initial Description
Original by dvdrtrgn
Initial Title
Remove duplicate itens from an array
Initial Tags
javascript, array
Initial Language
JavaScript