I ran into a bit of pickle lately, I'm trying to compare these two arrays.
Array1 = ["Red","Green","Blue","Yellow","Black"];
Array2 = ["Green","Violet","Black","White"];
I want to know if all the values in Array2 are not in Array 1. So what I came up with was this:
for(var i:int=0;i<Array2.length;i++)
{
if(Array1.indexOf(Array2[i]) == -1)
{
trace("No String found!")
}
}
Right now it gives me a trace every time it can't find a value. The issue I have is that I want it to perform the trace only if all the values in the Array2 are not in Array1.
Does any body have an idea?