name anonymous functions on property assignments

Jordan Harband ljharb at gmail.com
Sat Jan 28 19:59:25 UTC 2017


Indeed, but my linting rules forbid using the comma operator :-)

On Sat, Jan 28, 2017 at 11:17 AM, Oriol _ <oriol-bugzilla at hotmail.com>
wrote:

> > I fixed it by putting the function inside `Object()`
>
> You can also use the comma operator:
>
> ```js
> var anon = (0, function () {});
> anon.name; // ""
> ```
>
> ;Oriol
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170128/bc1eb477/attachment.html>


More information about the es-discuss mailing list