Javascript pertandingan melawan array

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

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