Unlike ||, which falls back for any falsy value, ?? only falls back when the left side is null or undefined. This means 0, '', and false are not replaced.
Challenge: Write withDefault(val) that returns val ?? 'default'.
π‘ Hints (1)
β’ ?? only triggers for null or undefined, not 0, false, or empty string