Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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
8th Dec 2017, 3:19 PM
Koketso Dithipe
Koketso Dithipe - avatar
+ 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)
9th Dec 2017, 1:01 AM
Eric Blinkidu
Eric Blinkidu - avatar