матч JavaScript против массива

// This long line of expression
x === 'firstmatch' || x === 'secondmatch' || x === 'thirdmatch'

// Can be shortened like this:
['firstmatch', 'secondmatch', 'thirdmatch'].includes(x)
Nutron