name anonymous functions on property assignments

Oriol _ oriol-bugzilla at hotmail.com
Sat Jan 28 19:17:44 UTC 2017


> 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/a5ddb958/attachment.html>


More information about the es-discuss mailing list