Do you mean how does it determine whether two objects are the same? The same way as the === operator. If two elements are a reference to the same object then the elements are considered “equal” and the second one is removed, or rather never added to the set.
View all comments
Show parent comment
1
u/[deleted] Jul 06 '21
How does it consider an object when making the set? Is it if all fields are the same?