Creating a filled array with a given length?

Rick Waldron waldron.rick at gmail.com
Thu Dec 13 07:48:45 PST 2012


On Thu, Dec 13, 2012 at 4:14 AM, Jussi Kalliokoski <
jussi.kalliokoski at gmail.com> wrote:

> [ ...Array(8) ].map( (v, i) => 1 << i )


That's awesome, check it out:
http://traceur-compiler.googlecode.com/git/demo/repl.html#%20%5B%20...Array(8)%20%5D.map(%20(v%2C%20i)%20%3D%3E%201%20%3C%3C%20i%20)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121213/ad43aa89/attachment-0001.html>


More information about the es-discuss mailing list