const array1 = [[1, 2, 3], [1,3,4], [1,2,5]];
let b = []
let c = [2,3]
array1.forEach(e => {
c.some(r => {
if(e.includes(r))
b.push(e)
})
})
console.log(b)
Upon running the code, the output was [ [ 1, 2, 3 ], [ 1, 2, 3 ], [ 1, 3, 4 ], [ 1, 3, 5 ] ]
However, the expected result should have been [ [ 1, 2, 3 ]]