Created
January 13, 2018 02:53
-
-
Save Joejhorn/571223f361963ee6bf3a5bee82b83048 to your computer and use it in GitHub Desktop.
chained ternary operator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var category = eatsPlants && eatsAnimals ? "omnivore" : eatsPlants ? "herbivore" : eatsAnimals ? "carnivore" : undefined; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment