Looking for a neat way to access a second non-null property from an object when then first property is null or undefined using ES6 object destructuring.
ES5 equivalent:
var obj = { a: null, b: 2 };
var num = obj.a || obj.b; // num = 2
Using ES6 (something like):
const { num: a || b } = obj; // <- how to achieve the above effect here?