Actions
Feature #9442
closedMultiple comparison construction with `==` and `===`
Feature #9442:
Multiple comparison construction with `==` and `===`
Status:
Rejected
Assignee:
-
Target version:
-
Description
I often want to write a condition that depends on multiple variables like this:
In order to make this compact, I sometimes write these cases like this:
or even
but I feel that constructing these arrays is a waste of resource, as well as is not elegant to write.
I request a syntax feature that allows multiple comparison using == and === in the spirit of multiple assignment with = :
so that the two examples above would be respectively written as:
and
Actions