SyntaxFix
Write A Post
Hire A Developer
Questions
Array.prototype.unique = function() { var a = [],k = 0,e; for(k=0;e=this[k];k++) if(a.indexOf(e)==-1) a.push(e); return a; } [1,2,3,4,33,23,2,3,22,1].unique(); // return [1,2,3,4,33,23,22]