DEV Community

Discussion on: Refactoring many OR statements like a ninja 🤘

Collapse
 
jasterix profile image
Jasterix

Great article. For the JavaScript block, where/how are you defining animal?

if (['🐓', '🐦', '🐧', '🦉'].includes(animal)) {
  console.log(`I'm bird, pew pew`);
}