I have this array
const array1 = [[1,2], [2,3], [1,2]]
I want to be able to get [1,2] as the output since it's a duplicate. I have tried:
array1.some((element, index) => {
return array1.indexOf(element) !== index
});
and
array1.filter((item, index) => array1.indexOf(item) !== index)
both of them doesn't work since I think it's an array of arrays. Any help is deeply appreciated.