this might be a duplicate but I couldn't find a solution. If I have an array of arrays, is there a "built-in" way to determine if that array of arrays includes another array. Array.prototype.includes()
helps, but doesn't get me all the way because of (I think) object references as shown below. I can manually test equality of each value but I'm sure there's a better way.
$ node
> b = [[1,2,3]]
[ [ 1, 2, 3 ] ]
> b[0]
[ 1, 2, 3 ]
> b.includes(b[0])
true
> b.includes([1,2,3])
false
>