Course · Section 9: Data Structures, Modern Operators and Strings · Lecture 113: Short Circuiting (&& and ||)
Implement `orDefault(value, fallback)` returning `value` if it is truthy, otherwise `fallback`, using the `||` operator.
+ 1 hidden test run on Submit.
Short-circuiting with || returns value unless it is falsy, in which case fallback.
Run your code to see results.