Array.prototype.getSet=function(){return Array.from(new Set(this));} alert([1, 1, 2, 2, 3].getSet());