So the double pipe `||` is the [logical OR operator](https://javascript.info/logical-operators#or).

I want to create a function where it can be either `foo`, or when thats flase (or falsy?) then it should use a default fallback. In this case 'bar'.

```js
const foo = 0;
const bar = 'somethingElse';

const qux = foo || bar;

console.log(qux); // returns 'somethingElse'

```

Now the above example will work unless foo is 0. Since JS will interpret that als falsy.

Now the following seems to be working:

```js
// ...
const qux = typeof foo !== 'undefined' ? foo : bar;

```

But I'm wondering if there is a better solution. What would be the best way of handling such a scenario?