How can I check if a certain array is in a nested array?
Let's say I have 2 variables defined as arrays, and I have a third variable. The third variable is a nested array, and it contains the variables:
var array1 = [1,2] var array2 = [3,4] var nestedArray = [array1,array2]
In this scenario, I can check if the third array holds array1 or array2 using
nestedArray.includes(array1 or 2)
However, if the third array holds the value of the other two but not the variable itself, then
nestedArray.includes(array1 or 2) returns false.