Is there a way to shorten the following
if (a === b || a === c || a === d)
down to something like
if (a === b || c || d)
The issue with the last section is it will test if a === b
, or if c
is true
, or if d
is true
.
Is there a way to shorten the following
if (a === b || a === c || a === d)
down to something like
if (a === b || c || d)
The issue with the last section is it will test if a === b
, or if c
is true
, or if d
is true
.