Skip to content

Glossary: JavaScript Basics

Optional chaining

Also written: ?.

The `?.` operator, which gives `undefined` instead of an error when the value before it is missing, as in `o.customer?.city`.

Where the book teaches it

Related terms

Nullish coalescingundefined / null