I have an array of arrays.
m = [[-100,100], [-100,-100], [-100,-100], [-100,100]]
Removing duplicates in this array has proven tricky for me. I attempted to use:
aa = [...new Set(m)];
// and
let chkdup = (arr, tar) => tar.every(v => arr.includes(v))`.
Unfortunately, I was not successful in removing the duplicates using these methods.
In Python, checking for duplicates is straightforward with [-100,100] in m
. However, I am unsure of the equivalent function in JavaScript. The includes
method does not seem to work in this case.