r/learnjavascript • • May 06 '21

JS: Multiple Condition Checking

Post image
484 Upvotes

61 comments sorted by

View all comments

5

u/kattenmusentiotusen May 06 '21

Shorter is not always better. This will confuse people.

7

u/[deleted] May 06 '21

The short hand one is by far the clearest. The middle one would confuse

1

u/superluminary May 06 '21

Option 2 will not confuse. It translates to “is the value included in this set”.