Short Comparing proposal
T.J. Crowder
tj.crowder at farsightsoftware.com
Thu Feb 2 08:40:09 UTC 2017
On Wed, Feb 1, 2017 at 7:18 PM, Andrea Giammarchi <
andrea.giammarchi at gmail.com> wrote:
> I understand, but you can also ternary within a ternary so why would this
> have different capabilities ?
>
Because `if (x === (|| 2, (&& 3, y === 1)))` is trying to use only *half*
of the expression within another expression. But using a conditional within
a conditional is using an entire expression within another expression,
which is fine.
-- T.J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170202/b96658e6/attachment-0001.html>
More information about the es-discuss
mailing list