Array.of

Rick Waldron waldron.rick at gmail.com
Mon Mar 3 06:09:11 PST 2014


On Mon, Mar 3, 2014 at 2:47 AM, Claude Pache <claude.pache at gmail.com> wrote:

>
> Le 3 mars 2014 à 04:22, Mark Volkmann <r.mark.volkmann at gmail.com> a écrit
> :
>
> > What is an example of a use case where one would choose to use Array.of
> instead of the literal array syntax?
> >
>

Back when Dave Herman and I first dreamed up Array.of, I wrote this up:
https://gist.github.com/rwaldron/1074126#arrayof--variable-arity-

Rick




>
> Here is one case where literal array syntax is not possible:
>
>         class ImprovedArray extends Array { ... }
>
>         let a = ImprovedArray.of( ... )
>
> --Claude
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140303/ecc7c859/attachment.html>


More information about the es-discuss mailing list