# A new conditioning way, compare multiple right hand values.

**URL:** <https://es.discourse.group/t/a-new-conditioning-way-compare-multiple-right-hand-values/1832>\
**Category:** 💡 Ideas\
**Tags:** proposal\
**Created:** [October 24, 2023, 6:13am UTC](https://es.discourse.group/t/a-new-conditioning-way-compare-multiple-right-hand-values/1832 "2023-10-24T06:13:31Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![aclaymore](https://yyz2.discourse-cdn.com/free1/user_avatar/es.discourse.group/aclaymore/32/501_2.png) [@aclaymore](https://es.discourse.group/u/aclaymore)\
**Post date:** [October 24, 2023, 6:10pm UTC](https://es.discourse.group/t/a-new-conditioning-way-compare-multiple-right-hand-values/1832/3 "2023-10-24T18:10:49Z")

</div>

Some other threads:

> [@Comparison to multiple values syntactic sugar](https://es.discourse.group/t/comparison-to-multiple-values-syntactic-sugar/357):
>
> In ECMA I would use (variable === val1 || variable === val2 ...) to attempt to compare a variable to multiple values. I think it would be a lot more elegant to run variable === | val1, val 2 | and have it automatically expand.

> [@Chained comparison syntax](https://es.discourse.group/t/chained-comparison-syntax/148):
>
> Would it be a good idea to introduce a chained comparison syntax? For example, [Python has them](https://docs.python.org/3/reference/expressions.html#comparisons).

> [@Operators: ||==, ||===](https://es.discourse.group/t/operators/1577):
>
> Could we use chaining comparison operators? Multiple comparisons: if( a === "first-comparison" || a === "second-comparison" || a === "third-comparison ) ... Chained comparisons: if( a ||=== "first-comparison ||=== "second-comparison" ||=== "third-comparison" ) ... The same syntax would work for &&. This is such a common issue that I assume it has already been proposed and rejected, but I couldn't find the conversation. The stack overflow question is 10 years old with 100k views. …

---

_[View the full topic](https://es.discourse.group/t/a-new-conditioning-way-compare-multiple-right-hand-values/1832)._
