title: Remove from array if not present in another array
body: <pre><code>var allowedIds = [1000, 1001, 1002, 1003, 1004];
  var idsToCheck = [1000, 1001, 1005, 1006];
  </code></pre>
  
  <p>I'm looking to find a way to remove 1005 &amp; 1006 from arrayToCheck as those ids are not in the allowedIds array</p>
  
  <p>any help would be appreciated.</p>
  
  <p>thanks!</p>