4 ms·
You can do it in JS too: states.find(state => state === 'VALID' || state === 'IN_PROGRESS') Or states.find(state => ['VALID', 'IN_PROGRESS'].includes
by simlevesque 3y ago
You can do it in JS too:
states.find(state => state === 'VALID' || state === 'IN_PROGRESS')
Or
states.find(state => ['VALID', 'IN_PROGRESS'].includes(state))
- recursive 3y agoThis is a little further away IMO, as it doesn't have the `v1 or v2` construction.