title: Merge keys array and values array into an object in JavaScript
body: <p>I have:</p>
  
  <pre><code>var keys = [ "height", "width" ];
  var values = [ "12px", "24px" ];
  </code></pre>
  
  <p>And I'd like to convert it into this object:</p>
  
  <pre><code>{ height: "12px", width: "24px" }
  </code></pre>
  
  <p>In Python, there's the simple idiom <code>dict(zip(keys,values))</code>. Is there something similar in jQuery or plain JavaScript, or do I have to do this the long way?</p>