title: JavaScript Array Push key value
body: <p>Ok, I'm going a little wrong here and I've already wasted an hour with this so hopefully one of you guys can help me.</p>
  
  <pre><code>var a = ['left','top'],
      x = [];
  
  for(i=0;i&lt;a.length;i++) {
      x.push({
          a[i] : 0
      });
  }
  </code></pre>
  
  <p>How do I go about pushing a value to each of the keys inside the <code>var a</code> array?</p>
  
  <p>You can see my failed attempted but hopefully that will give you an insight into what I'm trying to achieve.</p>