modulu, Raul's Array map example

Rick Waldron waldron.rick at gmail.com
Sun Sep 22 13:32:59 PDT 2013


On Sunday, September 22, 2013, Benjamin (Inglor) Gruenbaum wrote:

> I just asked Raul's weird syntax question in SO and tried to answer it
> myself. Going through the spec, I have to admit that he has a point and
> things could be clearer. I think the JS spec being good is a big factor not
> only for implementers but for developers too and it could be better :)
>
> However, admittedly I'm not a great writer myself and I don't know how the
> spec itself could be clearer in this case, and it was good *enough *for
> me as someone who has already read the spec to walk through. It would be
> great if that would be the case for new developers too.
>
> http://stackoverflow.com/questions/18947892/creating-range-in-js-strange-syntax/
>
>
I think you mean API, not syntax. Using Array.apply(null, arraylike) where
arraylike = some object with a length property to create an empty array
isn't the sort of content that belongs in a normative specification—it's
merely an interesting use of the language's API. The parts of the
expression in Ben's tweet are all explicitly specified in the standard.

Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130922/0cbc745d/attachment.html>


More information about the es-discuss mailing list