Array comprehensions with Spread operator
monolithed
monolithed at gmail.com
Wed Apr 15 16:23:55 UTC 2015
```js
let x = [0, 1, 2];
let y = [3, 4, 5];
// Expected
[ for (i of [x, y]) ...i ];
// Reality
Array.prototype.concat(...[ for (x of [x, y]) i ]);
// Result
[0, 1, 2, 3, 4, 5]
```
Is there any discussion on this subject?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150415/2ae02957/attachment.html>
More information about the es-discuss
mailing list