title: print key and value javascript object
body: <p>I have two arrays, one with keys and the other with their values. I combined them into an object. I want to select few (not all) keys and their values from the object and print both - the key as well as its value. No jQuery or any other framework please. Here is my example:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>keys = ["AB", "CD", "EF", "ABC", "ZZZ"];
  values = ["1", "2", "9", "DB", "xxx"];
  
  var dict = {};
  for (var x=0; x&lt;keys.length; x++){
   dict[keys[x]] = values[x];
  }
  
  console.log(dict['EF']); //9</code></pre>
  </div>
  </div>
  </p>
  
  <p>How do I get the output as EF:9</p>