title: How to loop through array and check array values
body: <p>so I have an Array and I want to loop through the Array and check if the values in it match some strings and if so do something.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>var rgt_count = a_related_genres_leon.length; // &lt;- 3 items
  
  for (var i = 0; i &lt; rgt_count; i++) {
  
      if inArray("Music", a_related_genres_leon) {
          console.log('Music');
      } else if inArray("TV", a_related_genres_leon) {
          console.log('TV');
      } else if inArray("Comedy", a_related_genres_leon) {
          console.log('Comedy');
      }
  }
  </code></pre>
  
  <p>I'm getting a Uncaught SyntaxError: Unexpected token ( error right now.</p>
  
  <p>I also tried this</p>
  
  <pre><code>if text($.inArray("Music", a_related_genres_leon)) {
          console.log('Music');
      } else if text($.inArray("TV", a_related_genres_leon)) {
          console.log('TV');
      } else if text($.inArray("Comedy", a_related_genres_leon)) {
          console.log('Comedy');
      }
  </code></pre>