IT lexicon › Web › Nullish coalescing

Nullish coalescing ??

Web På svenska → Updated: 2026-07-30

JS operator: x ?? "default" — returns default only if x is null or undefined.

Different from || which also triggers on 0, "", false. volume ?? 50 respects volume 0; volume || 50 picks the default. ES2020. Also ??= for "assign if nullish".

← Back to the lexicon