Course · Section 9: Data Structures, Modern Operators and Strings · Lecture 114: The Nullish Coalescing Operator (??)
Implement `nullishDefault(value, fallback)` returning `value` unless it is null or undefined, using `??`. Contrast this with `||`.
+ 1 hidden test run on Submit.
Nullish coalescing preserves valid falsy values, only substituting for null or undefined.
Run your code to see results.