Course · Section 2: JavaScript Fundamentals – Part 1 · Lecture 13: Basic Operators
Implement `coalesce(a, b)` returning `a` when it is neither null nor undefined, otherwise `b`.
+ 1 hidden test run on Submit.
Nullish coalescing keeps a unless it is null or undefined, unlike || which also rejects other falsy values.
Run your code to see results.