I have an array called 'array'
array = [[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]];
and I am trying to find the index of the subarray
[1, 2, 3, 4]
However, every time I attempt this, it returns -1 instead of the expected value of 0.
This is what I have tried so far:
array.indexOf(1, 2, 3, 4);
I understand that the issue lies with the commas in the subarray I am searching for.
Can someone please advise me on how to resolve this problem?