Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

null-coalescing operator

a ?? b: use a, or b if a is null.

The null-coalescing operator ?? returns its left operand if it is not null and otherwise evaluates and returns its right operand; ??= assigns only when the variable is null.

Examples

  • string shown = nickname ?? "(none)"; uses the nickname, or "(none)" if it's null.

Read the full section →