How to make this if statement shorter?

后端 未结 6 484
执念已碎
执念已碎 2021-01-28 04:57

Can I make this statement shorter?

if(abc==\'value1\' || abc==\'value2\' || abc==\'value3\') {//do something}

to make it look similar to this:<

6条回答
提交回复
热议问题