Javascript: How to write if a is a value from an array
<p>var <code>a = [1,2,3,4];</code></p>

<p>if given </p>

<blockquote>
  <p><code>b = 2</code></p>
</blockquote>

<p>how to verify b is in array a?</p>
