const a = [[1,1], [2,1], [3,1]];
console.log(a);
console.log(a.includes([1,1]));
> false
Can someone explain to me why the above outputs false? For what its worth, this occurs in any of the search functions (.find, .indexof, etc), as well as if I try [1,1] in a. I'm clearly missing something about how multidimensional array searching works in javascript.
var a={}, b={}; console.log(a==b); var c=a; console.log(a==c);And since arrays are objects,var a=[], b=[]; console.log(a==b); var c=a; console.log(a==c);produces the same result.