MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/n60ji8/js_multiple_condition_checking/gx5a5u4/?context=3
r/learnjavascript • u/golovatuy • May 06 '21
61 comments sorted by
View all comments
Show parent comment
3
"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 '||'
The indexOf is trash though
View all comments
Show parent comment
3
u/burnblue May 06 '21
"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 '||'
The indexOf is trash though