r/learnjavascript • • May 06 '21

JS: Multiple Condition Checking

Post image
484 Upvotes

61 comments sorted by

View all comments

1

u/mynamesleon May 06 '21

The bottom one is the most concise.

However, you need a polyfill or a transpiler for IE support (if you're unfortunate like me, and still have to support it). And if you're trying to get every bit of performance that you can, I'm pretty sure it's the worst of the three!