Removing duplicate items from an array in one line of ActionScript 3
var tMpaRr:Array = ["a","b","b","c","b","d","c"]; var aRr:Array = tMpaRr.filter(function (a:*,b:int,c:Array):Boolean { return ((aRr ? aRr : aRr = new Array()).indexOf(a) >= 0 ? false : (aRr.push(a) >= 0)); }, this); trace(aRr); //a,b,c,d