title: How to find array key from another array value in JavaScript?
body: <p>I did search on Stack Overflow, but I am still confused.</p>
  
  <p>There are two JavaScript arrays: <em>a</em> and <em>b</em></p>
  
  <pre><code>var a = ['US','UK'];
  var b = [
      US: 'United States',
      UK: 'United Kingdom',
      CN: 'China',
      JP: 'Japan'
  ];
  </code></pre>
  
  <p>How to get 'United states' and 'United Kingdom' by 'US' and 'UK', then create a new array <em>c</em> like below?</p>
  
  <pre><code>var c = [
      US: 'United States',
      UK: 'United Kingdom'
  ]
  </code></pre>