The destructuring algorithm in ECMAScript 6
2ality.com
2ality.com
Knowing the algorithm helps with understanding the difference between the following two function declarations.
function move({x=0, y=0} = {}) { /*...*/ }
function move({x, y} = { x: 0, y: 0 }) { /*...*/ }