for(var i:int = 0; i < a1.length; i++) { var a:unt = a1[i]; for(var j:int = 0 ; j < a2.length; j++) if(a2[j] == a) return true; }