Stop Writing Nested If-Chains: Optional Chaining and Nullish Coalescing in Practice
Optional chaining (?.) and nullish coalescing (??) replace verbose nested null checks with one readable expression — here's how to use them well, and where they bite.