`Map` accepts any key type, preserves insertion order and reports `size`. `Set` stores unique values. `WeakMap` holds keys weakly so entries can be garbage collected — good for caches attached to objects.
const seen = new Set(["0xabc"]);
seen.has("0xabc"); // true
const nonces = new Map();
nonces.set(addr, 3n);Use a Map when keys are dynamic or non-string; use an object for fixed, known shapes.