Why is concise body for method definition dropped?

Rick Waldron waldron.rick at gmail.com
Wed Jun 5 08:07:28 PDT 2013


On Wed, Jun 5, 2013 at 10:56 AM, Matthew Robb <matthewwrobb at gmail.com>wrote:

> Does a concise body method still return by default?
>

ArrowFunction offers implicit return in the unbraced form:

let two = () => 1 + 1;
two(); // 2

Whereas the braced form requires an explicit return, otherwise returning
the default undefined.

Rick



 /snip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130605/1f96bbeb/attachment.html>


More information about the es-discuss mailing list