JavaScript -Übereinstimmung gegen Array

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

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