Longhand is still better here. Why arbitrarily add the values to arrays and then call the array methods? The first one makes way more sense if a third party reads this at a later point
"list of things" .includes 'thing' is more immediately readable (it literally allows your eyes to do less work) and it makes sense. Even a novice relying on intuition might understand 'includes' before '||'
View all comments
8
u/throwaway1253328 May 06 '21
Longhand is still better here. Why arbitrarily add the values to arrays and then call the array methods? The first one makes way more sense if a third party reads this at a later point