/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function compareArrays( a1:Array, a2:Array ) :Array { var a3:Array = new Array(); var len1:int = a1.length; var notFound:Boolean = false; for( var i:int = 0; i<len1; i++ ) { var len2:int = a2.length; for( var j:int = 0; j<len2; j++ ) { if( String(a1[i]) == String(a2[j]) ) { notFound = false; break; } else { notFound = true; } } if( notFound ) { a3.push( a1[i] ) notFound = false; } } return a3; }
URL: www.mediapoint.gr