Javascript Array unique=function(a)
Array.prototype.unique=function(a){ return function(){return this.filter(a)}}(function(a,b,c){return c.indexOf(a,b+1)<0 });/*w ww .j ava 2 s .co m*/