The falsy values are `false`, `0`, `-0`, `0n`, `""`, `null`, `undefined` and `NaN`; everything else is truthy. `||` falls back on any falsy value, while `??` falls back only on `null`/`undefined` — which matters when `0` is a legitimate value.
const gas = input ?? 21000; // keeps 0 const label = name || "unknown"; // replaces "" const rpc = cfg?.network?.rpc; // undefined instead of a crash