javascript - Check variable equality against a list of values - Stack Overflow


PHOTO EMBED

Mon Jan 18 2021 07:25:58 GMT+0000 (UTC)

Saved by @ali_alaraby

if ([1,3,12].indexOf(foo) > -1)
content_copyCOPY

https://stackoverflow.com/questions/4728144/check-variable-equality-against-a-list-of-values