+ 8
https://m.youtube.com/watch?v=32XKdzoj2DI
http://2ality.com/2015/01/es6-destructuring.html
https://stackoverflow.com/questions/29333017/ecmascript-6-class-destructor
http://exploringjs.com/es6/ch_destructuring.html
https://codepen.io/tjwudi/pen/WvRLeO
sorry for giving you links, I don't know this language but I thought i could shorten your search
+ 4
spread in Javascript is just like splat in Python. It is a convenient way to convert an array of values into just the values. Consider Math.max() . It can take 2, 3, 4, or more arguments. But if you feed it an array arr of several values, it won't return the max of the array. So you can use spread to just get the values from the array:
Math.max(..arr)