Excuse me, why is there no way to remove duplicate objects in ES6 Set?

  javascript, question

The code is as follows:

var arr = [1, 3, 19, 3, '3m', '11', '3', 20, {
 name: 'component',
 age: 18
 }, {
 name: 'component',
 age: 18
 }];
 
 function uniq(arr) {
 var tmp = new Set(arr);
 return Array.from(tmp)
 bracket
 
 Time ('de-duplication');
 var ret = uniq(arr);
 Timeend ('de-duplication');
 console.log(ret);

The implementation results are as follows:

clipboard.png

Remarks:
Personal analysis is: the addresses of the two objects are different, so they are not removed.

When both values are objects, the comparison is whether the two objects point to the same object in memory. This is why{}! =={}Why?