My problem is about comparing the values of two different arrays, not to know if they are equal, but if a value in array A exists in array B.
Includes doesn't work, and I don't compare the length, only the values.
I spend many hours looking for an answer but found nothing precisely about this problem.
firstArray = [0,1];
secondArray = [[0,1],[0,2],[0,3],[1,1],[1,2],[1,3]];
How can I can compare firstArray and secondArray, to know if secondArray has the value of firstArray. It is like an equal comparison but only if the value of firstArray is in secondArray.
If it is, then the player can move on the board. The idea is that as long as firstArray value is one of secondArray value, the player can move. If not, no move possible.