Apr 26, 2024
What happens in case one does provide [2,2,{ foo: 1 },{ foo: 1 }]
to the Set
based approach? And why?
How would one argue that { foo: 1 }
is not a duplicate of { foo: 1 }
? And how would an approach look like that not only removes duplicates of primitive values and references but also structurally equal (data) objects?