P
psmahesh
Hi folks,
I am comparing two arrays and removing matches from the second array
from the first array.
Can someone take a look at this code below and mention if this is okay
and perhaps if there is a better way to achieve it
for(i=0;i<arrayA.length;i++){
for(j=0;j<arrayB.length;j++){
if(arrayA==arrayB[j])
{
arrayA.splice(i,1);
}
}
}
cheers
Mahesh
I am comparing two arrays and removing matches from the second array
from the first array.
Can someone take a look at this code below and mention if this is okay
and perhaps if there is a better way to achieve it
for(i=0;i<arrayA.length;i++){
for(j=0;j<arrayB.length;j++){
if(arrayA==arrayB[j])
{
arrayA.splice(i,1);
}
}
}
cheers
Mahesh