The fastest way would be to use a for loop and compare them, then return if found. Here is something you can work with, I used JSON for comparison, but you can just use whatever comparator you find best (there are plenty):
function arrayInArray(needle, haystack) {
var i=0, len=haystack.length, target=JSON.stringify(needle);
for(; i<len; i++) {
if (JSON.stringify(haystack[i]) == target) {
return i;
}
}
return -1;
}
arrayInArray( [0,1], [ [1,2], [0,1] ] ); // 1
If you want booleans, just return true instead of i and false instead of -1.