title: Sort an array in the same order of another array
body: <p>I have a few arrays of 50+ names like this.</p>
  
  <pre><code>["dan", "ryan", "bob", "steven", "corbin"]
  ["bob", "dan", "steven", "corbin"]
  </code></pre>
  
  <p>I have another array that has the correct order. Note that the second array above does not include all of the names, but I still want it to follow the order of the following:</p>
  
  <pre><code>["ryan", "corbin", "dan", "steven", "bob"]
  </code></pre>
  
  <p>There is no logical order to it, they are just in this order. What makes sense to me is to compare each array against the correctly ordered one. I think I saw some people doing this with PHP, but I was not able to find a JavaScript solution. Does anyone have any idea how to do this? I've been trying for a few hours and I'm stumped.</p>