1
JavaScriptBeginner#fundamentals
?. short-circuits to undefined instead of throwing when a link in the chain is null or undefined. ?? returns the right side only when the left is null or undefined, unlike || which also replaces 0 and ''.
user?.address?.city; // undefined, no crash const port = cfg.port ?? 3000; // keeps 0 if given const bad = cfg.port || 3000; // 0 becomes 3000