Set type judgment intersection and union in javascript

I am a novice. At present, I have encountered some confusion when learning set data types in Es6, as follows:
in the Es6 about Ruan Yifeng, it is mentioned that set types can be used to intersect and judge sets, but I have tried it unsuccessfully. I would like to ask what the problem is
Code

.
var a = new Set([[0, 1], [0, 0], [0, 2]])
var b = new Set([[0, 0], [0, 1]])

var union = new Set([...a, ...b]);
var intersect = new Set([...b].filter(x => a.has(x)));
console.log(union, intersect);

for the first union , there are still five results, all the elements in an and b are grouped together, but I think it shouldn"t be just a, because some of the elements in b are exactly the same as those in a

.

for the second intersect , the result is directly an empty set , but it should not be b if it is an intersection.

in addition, suppose I want to implement this function, how can I write code pull implementation for this set, which is a bit like a multi-dimensional array?

my level is still shallow, hope to correct


[0 br 0]! = [0 br 0] distinguishes the equality comparison between basic types and corresponding types
var b=new Set ([a]);
b.has (a) / / true
b.has ([0 0]) / / false


because the two arrays are false,. Although the values look the same, the storage address is different, and the comparison of reference types is to compare whether the variable points to the same address.
for the function you want to implement, either you write a de-duplication method to determine whether the corresponding positions of the two arrays are the same, or use JSON.stingify to process it and then compare it. In


set, two elements are considered to be the same only if the value and reference address are exactly the same.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e865c0-46b94.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e865c0-46b94.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?