title: Using Javascript find array values in another array and in order
body: <p>Here is one to get your brain going! I've not had any luck with it.</p>
  
  <pre><code>[1,2,1,1,2,1,1,1,2,2]
  
  [1,2,1,1,2,1]
  </code></pre>
  
  <p>I would like to use the second array to find the values in the first, but they must be in the same order.</p>
  
  <p>Once for I would like it to return the next key up from the last key in the second array.</p>
  
  <p>So in this example it would use the first six digits in the first array and then return 6 as the key after the final one in the second array.</p>