title: Key for javascript dictionary is not stored as value but as variable name
body: <p>I'm trying to create a dictionary object like so</p>
  
  <pre><code>var obj = { varName : varValue };
  </code></pre>
  
  <p>What I'm expecting is if <code>varName='foo'</code>, the obj should be <code>{'foo', 'some value' }</code> however what I see is <code>{varName, 'some value'}</code> the value of variable is not being used but a variable name as a key. How do I make it so that varible value is used as key?</p>