2d array includes array js

Solutions on MaxInterview for 2d array includes array js by the best coders in the world

showing results for - "2d array includes array js"
Mika
23 Jun 2018
1array.some(row => row.includes(search))
Federica
07 Feb 2020
1let arr = [[1,3], [1,1]];
2if(arr.some(row => JSON.stringify(row) === JSON.stringify([1,3]))){
3    console.log("arr contains this array")
4} else {
5    console.log("arr doesn't contain array")
6}