JavaScript

Optional Chaining

Definition

The `?.` operator that safely accesses deeply nested object properties without throwing if an intermediate value is `null` or `undefined`. Returns `undefined` instead of throwing a TypeError.

Code Example

Javascript
Tip: Modify the code above and click “Run” to see the results

Learn More

Related Terms