Results for “optional chaining”
Small, practical examples. Search by task or narrow things down below.
Read a nested optional value
Avoid dereferencing a missing nested object.
optional chaining✓ Tested
Read a nested value safely
Combine optional chaining with nullish coalescing in JavaScript.
JavaScript✓ Tested
Add an optional field to an existing table
SQL: A nullable column permits existing rows to remain valid while data is filled later.
SQL✓ Tested
Add an optional field to an existing table
SQL Server: A nullable column permits existing rows to remain valid while data is filled later.
SQL Server✓ Tested
Add an optional field to an existing table
Postgres: A nullable column permits existing rows to remain valid while data is filled later.
Postgres✓ Tested
Add an optional field to an existing table
SQLite: A nullable column permits existing rows to remain valid while data is filled later.
SQLite✓ Tested
Drop all optional Linux capabilities
Docker / Compose: The effective capability mask becomes zero after cap-drop ALL.
Docker / Compose✓ Tested
Give a function an optional argument
Let callers omit a value while keeping nounset enabled.
optional argument✓ Tested
Give an optional property a default
Handle missing object fields with nullish coalescing.
optional✓ Tested
Handle an optional dependency
Handle an optional dependency with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Handle an optional value
Handle an optional value in a complete Rust program using the standard library.
Rust✓ Tested
Keep an optional value only when valid
Keep an optional value only when valid in a complete Rust program using the standard library.
Rust✓ Tested