Open this lesson on a wider screen to play it. The narrated transcript and animated code need room to sit side by side — here's what that looks like:
← All lessons// Plain TypeScript: === on objects compares references, not contents. Two structs
// with identical fields are not equal, so a Set keeps both and a dedupe quietly
// does nothing.
const a = { id: 1, name: "Ada" };
const b = { id: 1, name: "Ada" };
console.log(a === b); // false
console.log(new Set([a, b]).size); // 2 — the "deduped" set still has both copies