Optimize OR in IF

前端 未结 7 806
不思量自难忘°
不思量自难忘° 2021-01-22 01:50

I have a code like this:

if (action == \'John\' || action == \'John Beckham\' || action == \'Henry John\'){
     alert(\'true!\');
}

How do I m

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