Proposal: switch statement multiple

Jacob Pratt jhprattdev at gmail.com
Sat Feb 16 04:03:54 UTC 2019


https://github.com/tc39/proposal-pattern-matching

On Sat, Feb 16, 2019 at 4:02 AM Juan Pablo Garcia <sarabadu at gmail.com>
wrote:

> I think it would be great if the switch statement allows multiple argument
>
> Example
> Switch(a,b)
> Case: 1,true
> Case: 1,false
> Case: 2,true
> ....
>
>
> Switch (true, true)
> Case: isPremium,  true
> Case: isBasic, hasCredit
> Case: isBasic, !hasCredit
>
>
> Maybe case: default, true
>
> Look forward to read yours views.
>
>
>
> I used to code in cobol and was very useful the sintax
> COBOL example:
> Evaluate a also b
> When 1 also true
> When any also false
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20190216/9d854dfa/attachment.html>


More information about the es-discuss mailing list