title: How to compare values in array to find one or more matches in another array?
body: <p>I try compare two arrays to find one or more than one matches of them.
  Somebody help me please?</p>
  
  <p><a href="http://jsfiddle.net/gmRDk/2/" rel="nofollow">http://jsfiddle.net/gmRDk/2/</a></p>
  
  <pre><code>$("button").click(function(i) {
  
  var products = [2, 5, 6, 7, 200];
  var item_id = [2, 1, 6, 200];
  
  $.each(item_id, function() {
  if ($.inArray(this, products) !== -1) {
      alert('Match Prod: ' + this);
  } else {
      alert('Not Match: ' + this);
  }
  });
  }); 
  </code></pre>