Continuing woes in reading the ES6 spec language

Angel Java Lopez ajlopez2000 at gmail.com
Sun Sep 15 16:43:55 PDT 2013


Umm.. I don't know if needed, but named parameters could be an special
case, that is, the normal parameters has no name, but you can invoke the
function with

f(1,2, x: 3, z: 4);

and use them:

function (arg1, arg2) {
    var x = arguments.x;
    var y = arguments.y;
    ...
}

AFAIR, in V8, arguments is an object, not an array. So, it can be used for
named parameters, a la Ruby.

Angel "Java" Lopez
@ajlopez
gh:ajlopez



On Sun, Sep 15, 2013 at 8:36 PM, Brendan Eich <brendan at mozilla.com> wrote:

> IOW, actual to formal parameter binding in JS is always positional, with
> undefined triggering defaulting, and (therefore) missing actuals triggering
> defaulting.
>
>
> /be
> ______________________________**_________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130915/f385b796/attachment.html>


More information about the es-discuss mailing list