Introduction to Optional Chaining
Premium
Reading a property of undefined throws a TypeError. The optional chaining operator ?. short-circuits to undefined instead. You'll combine it with ?? for safe defaults.
Reading a property of undefined throws a TypeError. The optional chaining operator ?. short-circuits to undefined instead. You'll combine it with ?? for safe defaults.