2 ms·
The destructuring algorithm in ECMAScript 6
- rauschma 12y ago[Disclaimer: I’m the author of the blog post.] 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 }) { /*...*/ }