I understand, but you can also ternary within a ternary so why would this
have different capabilities ?

On Wed, Feb 1, 2017 at 7:12 PM, T.J. Crowder <
[email protected]> wrote:

> On Wed, Feb 1, 2017 at 7:06 PM, Andrea Giammarchi <
> [email protected]> wrote:
>
>> Interesting. Would it play well nested too?
>>
>> ```js
>> if (x === 2 || (x === 3 && y === 1));
>>
>> // as
>>
>> if (x === (|| 2, (&& 3, y === 1)))
>> ```
>>
>
>
> ?
>>
>
> :-) I think at that point we're just creating an alternate expression
> syntax for JavaScript, which we probably want to avoid... Having the
> operands be Expression productions should be sufficient (which wouldn't
> allow that kind of nesting).
>
> -- T.J.
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to