Briefle
LearnGlossaryPricing

Briefle words · Code & architecture

Nullish coalescing

Also called ??

An operator that supplies a default value when the one on its left is null or undefined.

Say it to an AI

React TSX ShippingCard for the order page. customer, shippingAddress and delivery are all optional, so handle them explicitly with optional chaining and nullish coalescing and show readable fallbacks like "Guest checkout" and "date TBC" rather than crashing.

How an expert would brief the stronger version of “Order shipping card”.

See it

Try it as a puzzle →

Card on an online shop's admin order page. Guest orders have no customer; digital-only orders have no address or delivery.

Study A · the stronger one
Study B · the weaker one

Why: A's addr?.line1 ?? "No shipping address" shows a readable fallback instead of a blank or a crash.

Related words

  • Edge case
  • Guard clause
  • Swallowed exception
  • Fail fast
  • Side effect
  • Log level
  • Custom error class
  • instanceof check

Room 4 · Errors & edge cases

Learn “Nullish coalescing” in a five-minute lesson

Start free
AI can build almost anything. The bottleneck is saying what you want.
WordsPricingTermsPrivacyRefundsContact
© 2026 Briefle