← Back to archive

Stdle #104 · narrowing · 2026-09-18

What does this TypeScript snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

const a: string | null = null
const b: string | null = "B"
console.log(a ?? b ?? "C")
Narrowing
4 attempts left

Answer & explanation