This is something I frequently make a helper function out of.
```js
function d(argument, default_) {
return argument != null ? argument : default_
}
```
On Sun, Aug 16, 2015, 20:34 Brandon Andrews <[email protected]>
wrote:
> https://en.wikipedia.org/wiki/Null_coalescing_operator
>
> Essentially x ?? y will return x when not null or undefined else it will
> return y.
>
>
> A nice Javascript explanation of the current problems with using || that
> can cause unforeseen bugs:
>
> http://stackoverflow.com/a/476445
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss