title: How to use 'if' in the case of that it is true if one data is included in an array by javascript?
body: <p>I have a question whether this is possible or not.<br>
  For example, there is one code like below. But that code has an error for sure.<br>
  And I want to make <code>if</code> is <code>true</code> when one data is at some array.<br>
  Could you recommend some method?</p>
  
  <p>This is my code:</p>
  
  <pre><code>var a = 1;
  var model2 = [1, 2, 3];
  if (a == model2) {
      var b = a;
  } else {
      var c = a;
  }
  </code></pre>