Default Arguments in JS Object Destructuring
JavasScript's ES6 object destructuring feature supports default arguments. Here's an example of this super cool syntax:
> const newObj = { one: 1 }
undefined
> const { one, two = 2 } = newObj;
undefined
> one
1
> two
2
Tweet