title: jquery function to intersect arrays by the same elements
body: <p>Does exists a JS or jQuery function to intersect 2 arrays, for example:</p>
  
  <pre><code>var array1 = [1,2,3,4,5];
  var array2 = [2,4,8,9,0];
  var result = someFun(array1, array2);
  //result = [2,4];
  </code></pre>
  
  <p>sure I can make it manually, but maybe exists a shorter way.</p>