/ Published in: JavaScript

Original by dvdrtrgn
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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; }
Comments
