Arrow binding

Kevin Smith khs4473 at gmail.com
Tue Apr 24 10:21:12 PDT 2012


>
> 3. Method dynamically attached to an object - here we don't have
> special syntax, so we'll still need to use the "function" keyword.
>

Not necessarily.  Object literal extensions are a possibility here,
especially if you are attaching more than one method:

    obj.{
        addMethodA() { ... },
        addMethodB() { ... }
    };

kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120424/26aa8eb0/attachment.html>


More information about the es-discuss mailing list