IF Statement Multiple Answers - Same Result Javascript
Is their a method to have multiple right answers with the same result?


     function check(code){
        if(code == (8 || 9 || 13 || 16 || 17 || 18 || 20 || 32)){
          return true;
        }
     }

I know I can use a switch statement, but I was wondering if their is anyway similar to this. I already tried using an array but its slow.

I also realise that you can use && but I don't want to have to type code == a hundred times.
IF Statement Multiple Answers - Same Result Javascript
===

Is their a method to have multiple right answers with the same result?


     function check(code){
        if(code == (8 || 9 || 13 || 16 || 17 || 18 || 20 || 32)){
          return true;
        }
     }

I know I can use a switch statement, but I was wondering if their is anyway similar to this. I already tried using an array but its slow.

I also realise that you can use && but I don't want to have to type code == a hundred times.