I have came up with this simple snippet.
var a:Array = new Array( 1,2,3,4,5,6,7,8);
var b:Array = new Array( 6,7,8 ) //<<<These items need to be removed from a
public function removeItemsFromAThatAreListedInB(a:Array, b:Array )
{
for ( var i=0 ; i< a.length ;i++)
{
for ( var j=0 ; j< b.length ; j++)
{
if ( (a[i]) == (b[j]) )
{
a.splice(i,1)
}
}
}
}
Just wanna make sure, if someone has a better "optimized" and "speedier" way to do the same ?