Arrow functions and return values

Kevin Smith khs4473 at gmail.com
Thu Nov 29 08:49:07 PST 2012


> It's a bit unclear to me how arrow functions react to semicolons, for
> example:
>
> var a = (c) => {
>   var b = 2;
>   b * c;
> }
>
> a(4);
>

Hmmm...  I was under the impression that arrow functions with normal
function bodies do *not* implicitly return anything.  Maybe I need to
adjust my spec goggles, but I don't see that in the latest draft.

Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121129/7fdd11da/attachment.html>


More information about the es-discuss mailing list