I have the Array
array = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]];
and I want to find the index of the sub array
[1, 2, 3, 4]
So it should return the value 0
but every time I try to do this, it returns -1
Here is what i tried:
array.indexOf(1, 2, 3, 4);
I know this is because the subarray i am searching for has commas in it.
how can i fix this