Hello,
I'm trying to compare 2 arrays and find all the unique elements of the 2nd array that doesn't match the elements of the first array.
I'm trying this but I keep coming up w/ data that matches that's actually supposed to show as a non-match (if that makes any sense).
Here's what I'm trying so far:
I just don't know why this is hard - maybe I need more sleep.
Thanks for any time!
I'm trying to compare 2 arrays and find all the unique elements of the 2nd array that doesn't match the elements of the first array.
I'm trying this but I keep coming up w/ data that matches that's actually supposed to show as a non-match (if that makes any sense).
Here's what I'm trying so far:
Code:
for( var i:Number = 0; i < _root.swf_names_array.length; i++ )
{
for( var j:Number = 0; j < _root.txt_names_array.length; j++ )
{
if( test_swf_name[0] == test_txt_name[0] )
{
trace( "Matches" );
break;
}
else
{
trace( " No match here" );
not_found_array[j] = test_swf_name[0]; // add all non matches to the not found array
}
}
}
I just don't know why this is hard - maybe I need more sleep.
Thanks for any time!