Skip to content

Glossary: Node.js Basics

Optional chaining

Also written: ?., err.code?.startsWith

Writing `?.` gives `undefined` instead of throwing when the value before it is missing, such as an error with no `code`.

Where the book teaches it

Related terms

Error code