Optional Chaining (?.)
🧩 1. What Is Optional Chaining? Optional chaining (?.) lets you safely access nested object propertieswithout causing an error if something in the chain is null or undefined. 👉 It returns undefined instead of throwing an error. 🧱 The Problem (Without Optional Chaining) const user = {}; console.log(user.profile.name); // ❌ TypeError: Cannot read properties…
